diff options
author | Berke Viktor <bviktor@hexchat.org> | 2012-07-21 23:06:04 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2012-07-21 23:06:04 +0200 |
commit | 6533b75313bb4019dd04345c6544b9e1dd1404ae (patch) | |
tree | 012515d88032e811f4d175f73a4035b701513dcf /src | |
parent | 56afb16608cf7d641bc6e311312949e234756454 (diff) |
Unused sndPlaySound method for future reference
Diffstat (limited to 'src')
-rw-r--r-- | src/common/text.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/common/text.c b/src/common/text.c index 133facd1..7ec5d0ae 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -2280,6 +2280,10 @@ sound_play (const char *file, gboolean quiet) char wavfile[512]; char *file_fs; char *cmd; +#if 0 + LPSTR lpRes; + HANDLE hResInfo, hRes; +#endif /* the pevents GUI editor triggers this after removing a soundfile */ if (!file[0]) @@ -2314,6 +2318,27 @@ sound_play (const char *file, gboolean quiet) if (cmd == NULL || strcmp (cmd, "esdplay") == 0) { PlaySound (file_fs, NULL, SND_NODEFAULT|SND_FILENAME|SND_ASYNC); +#if 0 /* this would require the wav file to be added to the executable as resource */ + hResInfo = FindResource (NULL, file_fs, "WAVE"); + if (hResInfo != NULL) + { + /* load the WAVE resource */ + hRes = LoadResource (NULL, hResInfo); + if (hRes != NULL) + { + /* lock the WAVE resource and play it */ + lpRes = LockResource(hRes); + if (lpRes != NULL) + { + sndPlaySound (lpRes, SND_MEMORY | SND_NODEFAULT | SND_FILENAME | SND_ASYNC); + UnlockResource (hRes); + } + + /* free the WAVE resource */ + FreeResource (hRes); + } + } +#endif } else #endif { |