| RTL Reference|Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link Back |
"REAL" DELPHI
Using Real Audio files (and more) in a Delphi application.
Dateline: 02/22/2000
Real Audio Player
Internet, audio, video, really great multimedia experience ... but, is it possible to integrate RealAudio functionality in our Delphi application?
The answer is yes, it is!
The RealAudio Control for ActiveX provides access to RealMedia programming and extends the audio capabilities of our Delphi applications.
Installing ![]()
Let's see how to embed the Real Player right into our application. All we need to have is the RealAudio ActiveX control, which we can get for free (basic version) from RealNetworks Inc. The RealAudio Control for ActiveX is usually installed with Real Player software.
To install the RealAudio ActiveX control, simply follow the steps below:
- Start Delphi and select Component | Import ActiveX Control...
- Look for the "RealAudio Control for ActiveX" and simply click on Install.
- Select a package where the new component must be installed or create a new package for the new TRealAudio control. It's ok to accept Delphi's default option. Click on Ok.
- Delphi will prompt you whether you want to rebuild the modified/new package or not. Click on Yes.
- After the package is compiled, Delphi will show you a message saying that the new TRealAudio component was registered and already available as part of the VCL. Close the package detail window, allowing Delphi to save the changes to it.
- The component is now available in the ActiveX tab (if you didn't change this setting in step 2).
Using - no code
In order to use our new component we have to go to the ActiveX tab in the component palette and drop a TRealAudio component on a form.
The most important property of a TRealAudio component is Source. Using the object inspector, set the Source property to the name of an existing ram file on your system (this should look like "file://c:\...\SomeFile.ram").
But hey, the main function of RealAudio is to stream media clips over a network so try with some URL (e.g. Delphi Intro) while connected to the Internet.
Now all you have to do is resize the component and listen to the audio file (try with MP3 files) from your Delphi application. Remember that this can be done done in runtime, so you can open and close files from code, as well as resize the control.

All graphics in this feature created by Zarko Gajic.
More Features...
Use TPictureClip custom component to extract portions of a matrix of pictures and assign the "cell picture" to another picture control.
Newsletter...
