Solved

Playing Real Audio Sound Files in Delphi

Posted on 1998-08-17
12
523 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

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
 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

860 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