Generating sound effects with the internal speaker...
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.
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]
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]
VoT: you could d/l doom/wolfenstain source code from ftp.idsoftware.com and have a look at how they did it.
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement