Index   Commented   Search   About

The PlaySound Function

You can use the PlaySound function to play waveform audio, as long as the sound fits into available memory. (The sndPlaySound function offers a subset of the capabilities of PlaySound. To maximize the portability of your Win32-based application, use PlaySound, not sndPlaySound.)

The PlaySound function allows you to specify a sound in one of three ways:

  • As a system alert, using the alias stored in the WIN.INI file or the registry

  • As a filename

  • As a resource identifier

The PlaySound function allows you to play a sound in a continuous loop, ending only when you call PlaySound again, specifying either NULL or the sound identifier of another sound for the pszSound parameter.

You can use PlaySound to play the sound synchronously or asynchronously, and to control the behavior of the function in other ways when it must share system resources.

For examples of how to use PlaySound in your Win32-based applications, see Playing WAVE Resources.

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
TMS Scripter Studio Pro components for Delphi/C++Builder

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

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun