Sounds are one of the important part of applications. Basically playing sound is sending signals to audio device / audio card of your computer to generate sounds in its voltage and frequency.
In C++ Builder, simply if you want to warn for something beginning or done we can use Beep(frequency, duration) command as below;
1 2 3 |
Beep(1000,100); |
We can directly play wav, mp3 files by using play sound in asynchronous as below;
1 2 3 |
PlaySound(L"D:\\test.wav",100, SND_ASYNC); |
We can directly play wav, mp3 files by using play sound as below;
1 2 3 4 5 |
PlaySound(L"D:\\test.wav",100, SND_SYNC); PlaySound(L"D:\\test.wav",NULL,SND_FILENAME|SND_ASYNC); |
We can directly play media files by using MediaPlayer component in C++ Builder;
1 2 3 4 |
MediaPlayer1->FileName=L"D:\\test.wav"; MediaPlayer1->Play(); |
Another method is playing sounds in frequency.
Design. Code. Compile. Deploy.
Start Free Trial
Free C++Builder Community Edition