Jump to content
  • Advertisement


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


DirectSound and elemental control

This topic is 5612 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How does one perform signal processing on the contents of the buffer on an elemental basis when using DirectSound, AudioVideoPlayback or DirectShow? i.e. if I'm playing back a wav or an mp3 (AudioVideoPlayback) file, the process is as follows: wav/mp3 file ---> line out (speaker) If I wanted to introduce some kind of signal processing, say a filter or a delay, could I do this: wav/mp3 file ---> processor ---> line out (speaker) If at all this is possible, how do I set up my arrays? [edited by - CrushingHellHammer on June 3, 2004 7:03:46 PM]

Share this post

Link to post
Share on other sites
Yes, it certainly is possible. But don''t expect to do signal processing without some type of delay. I am doing that for decoding of digital signals from a radio.

Basically you use DirectSoundCapture to receive (record) chunks of data. Then you do whatever you want with the received data in terms of handling or "digital signal processing" and then once the sound signal is processed, you do whatever you want with that. THis is done on a continual basis. For my problem, the challenge was to reduce the delay as much as possible, for I needed to detect a signal and stop a scan. If the delay was too long, by the time I detected the signal, the radio would have moved on to another channel. I read the DirectSoundCapture buffer every 10 ms (which is fairly often).

Note that there is an immediate delay in just receiving the data since you have to receive the data in chunks. That means the sound signal first in is not even looked at until the last byte of that data hunk is received. Then you have to process that hunk. Depending upon what you want to do, filter, FFT, etc., that will also introduce delays, as it takes a minimum amount of received data before these algorithms can be performed. Some algorithms take more than others.

The easy part is capturing the data.

The work (both for you and the CPU) is the digital signal processing of the received data...and that is entirely depedndent upon what kind of processing you are doing.

Then you can do what you want with the processed data. Display it, play it, etc.


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!