Solved

Playing Real Audio Sound Files in Delphi

Posted on 1998-08-17
12
518 Views
Last Modified: 2013-11-17
Basically, my question is, can you play Real Audio (*.ra) sound files from a Delphi program.

I have a program where I want to play stored sound files. These sound files a full length songs, and by using the WAV format it just takes up too much space to store these files. By converting them to Real Audio format it reduces the size of a sound file to about 20% of it's original WAV format size.

So, is it possible to play a non-Windows sound file from a Delphi program? Or is there another sound format out there that will save me space? Is it possible to get the file format of a Real Audio file and program it at the lowest level to play it?

Thanks.
0
Comment
Question by:rocknroll
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1336404
do you mean just audio cd tracks?
0
 
LVL 4

Expert Comment

by:d003303
ID: 1336405
Another good format is MPEG-Layer-3 Audio that has a very effective compression (nearly CD-Quality) and is most common on the net. There are several MP3 sources on the net, but all in C. I'll take a look if there are some free libraries to use.

Slash/d003303
0
 
LVL 1

Expert Comment

by:Greedy
ID: 1336406
You can embed the Real Audio control by doing this.
These instructions are for D3.

From the main menu in Delphi go to Component | Import ActiveX Control...
Select RealAudio ActiveX Control Library from the list and click on the Install button

Install it into a new package (second tab)
it then builds the new package and installs it into you component pallet...usualy under the ActiveX Tab.  Then just drop this on the form and your all done...for some reason it doesn't size itself very well so you'll have to resize it...you may also need to right click on it and go to scale to get it to look right.

MP3 might be a better choice because it's not as propriatary as this thing is...but I have never seen anything comparing MP3 to real audio format so I don't know what is better/smaller...there are several MP3 libs for Delphi and some even have MOD file players build into them too...Oh well, hope this gives you some help or ideas on what you want to do.

0
 

Author Comment

by:rocknroll
ID: 1336407
I've checked out the *.MP3 files. The compression rate doesn't seem to be as good as *.RA files, but I get the feeling that they are more easy to work with. I couldn't find a lot of info on *.MP3 files and how to play them within a program.

Is this more difficult than I imagined? I'm using Delphi 2 by the way. Is there any code out there that will play an *.MP3 audio file?


0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1336408
rocknroll,

 look at these, that what I know about them :

there are components at : http://www.delphipages.com/ 

but they are made to talk with winamp, ...

other's, but not winamp 'needers'

    http://www.ig.com.ua/wabbit/programs/mpegplay.html 

    http://www.dialog-medien.de/html/products.html 

    http://www.ege.edu.tr/delphi/ftp/d20free/mpegplay.zip 

Regards, Zif.

0
 
LVL 4

Expert Comment

by:d003303
ID: 1336409
A good library, including source and demo program is on the DSP. Take a look at

http://sunsite.icm.edu.pl/delphi/ftp/d20free/mpegplay.zip

The demo is not that portable. You will have to modify some properties of MPlayer in object inspector. Change EndPos to 0 to play the entire file and set PathToDLL to an empty string. Put the mpegdll.dll in the same directory as your project and be happy !

Slash/d003303
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 8

Expert Comment

by:ZifNab
ID: 1336410
d003303, euhm, no problem, but the answer you gave : mpegplay.zip... is already proposed in my comment. Zif.
0
 
LVL 4

Expert Comment

by:d003303
ID: 1336411
uh, sorry ! Did not read through it well enough I think...
I did not intend that, I downloaded the component a week ago and did not have much time for testing around until yesterday.
Sorry again.

rocknroll,
if this is what you need please reject my answer, Zif was first !

Slash/d003303
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1336412
d003303, no problem, thought already that you didn't read it thouroughly :-)). Bad, bad boy, tsss, tsss, ..., has your mother never told... ;-))))). C.u. Zif.
0
 
LVL 4

Expert Comment

by:d003303
ID: 1336413
...she tried, but seems that she only tried, no success ;-))
0
 

Author Comment

by:rocknroll
ID: 1336414
Thanks guys,

Yes, this is what I was looking for.

d003303, I rejected your answer like you said. Yes, apparently Zif was first. Now, how do I allocate the points for this question?
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 200 total points
ID: 1336415
rocknroll,

        look at these, that what I know about them :

       there are components at : http://www.delphipages.com/ 

       but they are made to talk with winamp, ...

       other's, but not winamp 'needers'

           http://www.ig.com.ua/wabbit/programs/mpegplay.html

           http://www.dialog-medien.de/html/products.html

           http://www.ege.edu.tr/delphi/ftp/d20free/mpegplay.zip

       Regards, Zif.

Like this, now you can grade this Q. but, heck, it was no problem if you gave the points to   d003303 (easy, fo me to say now :-)) ...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help on project with Soap 10 48
Performance of SQL statement 37 101
Moving (cutting/pasting) controls in a TTabbedNotebook... 7 27
How to open a .vcf file 11 54
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
The viewer will learn common shortcuts with easy ways to remember them. The viewer will then learn where to find all of the keyboard shortcuts, how to create/change them, and how to speed up their workflow.
Viewers will learn how to use the Hootsuite Dashboard.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now