Skip to main content
gamedev.net
🔒 Locked

Sound

Started by grahamhinchly Jan 21, 2001 at 6:35 AM 1 replies 250+ views
Original Post
grahamhinchly
grahamhinchly
Could somebody please tell me how to add sound or colour to a text based prog? I am using Dev C++ v4. but don''t want to use DirectX or Open GL. Any suggestions? Thank you Graham Hinchly
We were all beginners once, don't forget that...
forgotton_associator
forgotton_associator
Use winmm.h (i think thats what its called)
here you have two things: MCI and simple thingy''s

too lazy to go through MCI

SimpleThingy''s........
try find mmedia.hlp for more info

PlaySound(LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);

pszSound is a pointer to a string of the sound to play''s location (ie c:\mscrashrecovery\worddocinwav.wav)...put this value as null to stop all sounds

hmod just put NULL

fdwSound or these togeather
SND_FILENAME = pdzSound points to a file
SND_ASYNC = use this if u want the sound to play and your prog to continue
SND_MEMORY = pdzSound is a memory pointer to sound loaded in memory
SND_SYNC = use this to halt your prog till sound stops

thats about it...or were you referring to DOS? if you were then find some other library.....its annoying to implement it by self

eh?
eh?
grahamhinchly
grahamhinchly
Sorry, i forgot to mention I was using DOS.
We were all beginners once, don't forget that...

Topic Locked

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

Sign in to reply to this topic.