Skip to main content
gamedev.net
🔒 Locked

Using the API function PlaySound

Started by thijsjellema Oct 16, 2001 at 2:58 PM 0 replies 1k views
Original Post
thijsjellema
thijsjellema
Hello! The following is from a message i posted before, it was about the Win32 API function PlaySound to play wave files from memory instead of playing them from a file on disk. To play a wave file from disk i use the following code: (It's in Delphi, pascal) var SoundString:string; SoundString:='SoundFileName.wav'; PlaySound(SoundString,0,SND_ASYNC or SND_FILENAME); But now i want to play a wave file from memory. The helpfile says that a have to do the following: PlaySound(SoundString,0,SND_ASYNC or SND_MEMORY); The SoundString varaible must point to an image of a sound in memory, i don't know how to do that or what to do after that... Can perhaps anyone tell me how i can do this?????? Thank you very much! Thijs Jellema to_thijs@hotmail.com Edited by - thijsjellema on October 16, 2001 3:59:21 PM Edited by - thijsjellema on October 16, 2001 3:59:41 PM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.