Главная страница | назад





Article #16928: Playing sound from a Windows application

 Technical Notes Database
TN1928C.txt Playing sound from a Windows application
Category :C++
Platform :All
Product :BC 3.0
Description:
QUESTION:
How do I play sound through the PC Speaker in a Windows Application?
ANSWER:
Use the following source code...
void FAR PASCAL UIErrorBeep(void)
{
OpenSound();
SetVoiceNote(1, 49, 16, 1);
SetVoiceNote(1, 54, 32, 1);
StartSound();
WaitSoundState(S_QUEUEEMPTY);
StopSound();
CloseSound();
}
Note: This source is provided as an EXAMPLE, not the definitive rule on
how to do something in Windows.
7/2/98 10:42:33 AM

Last Modified: 31-OCT-00