Archived

This topic is now archived and is closed to further replies.

Voice Of Tango

Generating sound effects with the internal speaker...

Recommended Posts

For my current game I am planning to use the internal speaker for all of the sounds. I''m using a beep() function which takes parameters for the frequency and the duration of the sound. Obviously, if you use this for any extended duration you just get a solid beep. My question is: would I be able to use this function to replicate crude explosion sounds (you know the sort I mean) by using beeps of very short duration and rapidly changing the frequency in some fashion? If so, what sort of pattern would I use? I''ve googled extensively and found very little of value. Any help would be greatly appreciated, seeing as I know absolutely nothing about sound programming. Thanks in advance.

Share this post


Link to post
Share on other sites
Some of the MOD players used to be able to access the internal speaker - have a look for some code or a library which will let you play MODs through the speaker...

Edit, I found this: "In the middle to late 1980's, software developers discovered that you could play digitized sound through the PC speaker without additional hardware by utilizing Pulse-Width-Modulation, which toggles the PC's internal speaker faster than it can physically move to simulate positions between fully on and fully off."

[edited by - Kenbar on July 3, 2003 6:00:34 PM]

Share this post


Link to post
Share on other sites