Solved

Playing Real Audio Sound Files in Delphi

Posted on 1998-08-17
12
515 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
Comment Utility
do you mean just audio cd tracks?
0
 
LVL 4

Expert Comment

by:d003303
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 8

Expert Comment

by:ZifNab
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
...she tried, but seems that she only tried, no success ;-))
0
 

Author Comment

by:rocknroll
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If your app took Google’s lash recently, here are the 5 most likely reasons.
In our personal lives, we have well-designed consumer apps to delight us and make even the most complex transactions simple. Many enterprise applications, however, are a bit behind the times. For an enterprise app to be successful in today's tech wo…
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

771 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

10 Experts available now in Live!

Get 1:1 Help Now