home *** CD-ROM | disk | FTP | other *** search
- #include <windows.h>
-
- typedef BOOL (FAR PASCAL *_sndPlaySound_)(LPSTR,WORD);
-
- class PLAYWAVE
- {
- private:
- WORD wError;
- _sndPlaySound_ sndPlaySound;
- HANDLE hMemMMSYSTEM;
- void Error(void);
- public:
- PLAYWAVE();
- ~PLAYWAVE();
- void Play(LPSTR,WORD);
- void Resource(HANDLE,LPSTR);
- };
-
- #define SOUND_SYNC 0x0000 // play synchronously (default)
- #define SOUND_ASYNC 0x0001 // play asynchronously
- #define SOUND_NO_DEFAULT 0x0002 // don't use default sound
- #define SOUND_MEMORY 0x0004 // lpszSoundName points to a memory file
- #define SOUND_LOOP 0x0008 // loop the sound until next sndPlaySound
- #define SOUND_NOSTOP 0x0010 // don't stop any currently playing sound
-
-
- #define WAVE_ERROR_BAD_FORMAT 0x0020 // Wave format not supported
- #define WAVE_ERROR_PLAYING 0x0021 // Still something playing
- #define WAVE_ERROR_NOT_READY 0x0022 // Header not ready
- #define WAVE_ERROR_SYNC_ONLY 0x0023 // Device is synchronous only
-
-