playsoundapi.h (2102B) - Raw
1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 7 #ifndef _PLAYSOUNDAPI_H_ 8 #define _PLAYSOUNDAPI_H_ 9 10 #include <apiset.h> 11 #include <apisetcconv.h> 12 13 #include <mmsyscom.h> 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) 20 21 #ifndef MMNOSOUND 22 23 WINMMAPI WINBOOL WINAPI sndPlaySoundA(LPCSTR pszSound, UINT fuSound); 24 WINMMAPI WINBOOL WINAPI sndPlaySoundW(LPCWSTR pszSound, UINT fuSound); 25 #define sndPlaySound __MINGW_NAME_AW(sndPlaySound) 26 27 #define SND_SYNC 0x0000 28 #define SND_ASYNC 0x0001 29 #define SND_NODEFAULT 0x0002 30 #define SND_MEMORY 0x0004 31 #define SND_LOOP 0x0008 32 #define SND_NOSTOP 0x0010 33 34 #define SND_NOWAIT __MSABI_LONG(0x00002000) 35 #define SND_ALIAS __MSABI_LONG(0x00010000) 36 #define SND_ALIAS_ID __MSABI_LONG(0x00110000) 37 #define SND_FILENAME __MSABI_LONG(0x00020000) 38 #define SND_RESOURCE __MSABI_LONG(0x00040004) 39 40 #define SND_PURGE 0x0040 41 #define SND_APPLICATION 0x0080 42 #define SND_SENTRY __MSABI_LONG(0x00080000) 43 #define SND_RING __MSABI_LONG(0x00100000) 44 #define SND_SYSTEM __MSABI_LONG(0x00200000) 45 46 #define SND_ALIAS_START 0 47 48 #define sndAlias(ch0, ch1) (SND_ALIAS_START + (DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8)) 49 50 #define SND_ALIAS_SYSTEMASTERISK sndAlias('S', '*') 51 #define SND_ALIAS_SYSTEMQUESTION sndAlias('S', '?') 52 #define SND_ALIAS_SYSTEMHAND sndAlias('S', 'H') 53 #define SND_ALIAS_SYSTEMEXIT sndAlias('S', 'E') 54 #define SND_ALIAS_SYSTEMSTART sndAlias('S', 'S') 55 #define SND_ALIAS_SYSTEMWELCOME sndAlias('S', 'W') 56 #define SND_ALIAS_SYSTEMEXCLAMATION sndAlias('S', '!') 57 #define SND_ALIAS_SYSTEMDEFAULT sndAlias('S', 'D') 58 59 WINMMAPI WINBOOL WINAPI PlaySoundA(LPCSTR pszSound, HMODULE hmod, DWORD fdwSound); 60 WINMMAPI WINBOOL WINAPI PlaySoundW(LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound); 61 #define PlaySound __MINGW_NAME_AW(PlaySound) 62 63 #endif /* MMNOSOUND */ 64 65 #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ 66 67 #ifdef __cplusplus 68 } 69 #endif 70 71 #endif /* _PLAYSOUNDAPI_H_ */