|
Processing the MM_WOM_DONE Message
The following example shows how to process the MM_WOM_DONE message. This example assumes the application does not play multiple data
blocks, so it can close the output device after playing a single data block.
// WndProc--Main window procedure.
LRESULT FAR PASCAL WndProc(HWND hWnd, UINT msg, WPARAM wParam,
LPARAM lParam)
{
switch (msg)
{
case MM_WOM_DONE:
// A waveform-audio data block has been played and
// can now be freed.
waveOutUnprepareHeader((HWAVEOUT) wParam,
(LPWAVEHDR) lParam, sizeof(WAVEHDR) );
// Free hData memory.
waveOutClose((HWAVEOUT) wParam);
break;
}
return DefWindowProc(hWnd, msg, wParam, lParam);
}
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Programmer's Reference (win32.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|