DirectSound Find data about a buffer?

ZeroEffect

Junior Contributor
Joined
Oct 24, 2004
Messages
204
Location
Detroit, MI
Using the DXSDK I figured out how to record audio and play it back. I have two other things I want to do.

1. I want the recording to be automatic.
2. I need to have it stop automatically.

The audio that I was to record comes in with three tones in the begining [Header] and ends with three tones [EOM]. I need to make directx record when the header starts and stop when the EOM is complete.

So I some how need to watch a soundcard input and wait for this information. Audio level alone will not work.

Does anyone know where I should start?

Thanks

ZeroEffect
 
**UpDate** DirectSound Find data about a buffer?

Ok I have found a way to get the data I want using an activeX control. But now I have a different thing I would like to try. I have a way to trigger when I want to start recording but, I miss the first 2 seconds of the audio I want to record.

Here is my idea setup one "feed" to monitor in real time and another that would be "delayed" by three seconds so when my trigger was activated I could start writing to a file with out losing the audio I want. I could then delay when I stop recording to a file buy the same delay so I don't lose the audio at the end.

This delay type is like a profanity delay. The audio doesn't need a delay effect, it just needs to be delayed.

What would be a good way to accomplish this or even start?

Thanks for any ideas you may have.

ZeroEffect
 
Last edited:
Re: **UpDate** FIFO BackBuffer Circular buffer DirectSound Find data about a buffer?

Ok I have found a way to get the data I want using an activeX control. But now I have a different thing I would like to try. I have a way to trigger when I want to start recording but, I miss the first 2 seconds of the audio I want to record.

Here is my idea setup one "feed" to monitor in real time and another that would be "delayed" by three seconds so when my trigger was activated I could start writing to a file with out losing the audio I want. I could then delay when I stop recording to a file buy the same delay so I don't lose the audio at the end.

This delay type is like a profanity delay. The audio doesn't need a delay effect, it just needs to be delayed.

What would be a good way to accomplish this or even start?

Thanks for any ideas you may have.

ZeroEffect

Ok moving forward I think I have a sloultion to what I want to do. While looking into this I found people talking about FIFO and circular buffers and backbuffers but no example I could understand completely. I am not on my computer with my code but I think if I take the buffer from directx that I would normally write to a file and put it into this type of buffer, let it build up to the point I get the desired "delay" I want I could then start writing that buffer to file. to get the three seconds of audio delay I want my buffer would be 516KB for a 44.1 Stereo file. 258KB for a 44.1 Mono file.

Would anyone have a sample of this invb.net that I could play with to help me figure this out?

Thank you for any help you may be able to give me.
 
Back
Top