Reverse buffers.
How would you go about reversing directsound buffer to play something in reverse? I can''t seem to retrive or set the size of the buffer.
Cheers
Al
The best way is to create a second ''reverse'' buffer when you create the first one and populate it with the reverse of the sound.
There doesn''t seem to be any way to do it on the fly unless you use custom mixing.
Mark
Bytten Independent Games Magazine
http://www.bytten.com
Sound Effects For Game Developers
http://www.indiesfx.co.uk
There doesn''t seem to be any way to do it on the fly unless you use custom mixing.
Mark
Bytten Independent Games Magazine
http://www.bytten.com
Sound Effects For Game Developers
http://www.indiesfx.co.uk
How would you go about doing this?
I''ve tried copying the data to another buffer in reverse but can''t seem to get it to work.
Cheers
Al
I''ve tried copying the data to another buffer in reverse but can''t seem to get it to work.
Cheers
Al
qals: how do you imagine reversing a continuous waveform (for example, one being read from the mic)?
If you want to reverse a loaded sound source (such as one loaded from a wav file), simply reverse the sound itself and feed it to the DS buffer. It could look somthing like this (pseudocode):
Data2 is now reversed Data.
If you want to reverse a loaded sound source (such as one loaded from a wav file), simply reverse the sound itself and feed it to the DS buffer. It could look somthing like this (pseudocode):
Load16bitWAV(Data, &Size);do { Data2[Size - i] = Data[i]; } while(i < Size)
Data2 is now reversed Data.
"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