Sign in to follow this  
Barcik

Captruting IDirectSoundBuffer with effects

Recommended Posts

Hi all, I have an IDirectSoundBuffer I loaded from a wave file. Now, I apply some effects to it and want to store the resutl to a different wave file. I thought about capturing it in a IDirectSoundCaptureBuffer, but understood there is no simple way to give it as input. Now, I'm thinking about somehow simply copying the memory, but IDirectSoundBuffer's lock doesn't give a read pointer. Is there any way to do this? Thanks in advance, Barcik [Edited by - Barcik on July 5, 2008 5:56:45 AM]

Share this post


Link to post
Share on other sites
Not sure which language you're using but IDirectSoundBuffer8::Lock(...) and IDirectSoundCaptureBuffer8::Lock(...) are available in DX9 C++ and those calls return pointers to the locked portion of the buffer.

Is that perhaps what you're looking for?

Share this post


Link to post
Share on other sites
C++ is the language.

From the reference for IDirectSoundBuffer::Lock :

Quote:
Warning This method returns a write pointer only. The application should not try to read sound data from this pointer; the data might not be valid even though the DirectSoundBuffer object contains valid sound data. For example, if the buffer is located in on-board memory, the pointer might be an address to a temporary buffer in main system memory. When IDirectSoundBuffer::Unlock is called, this temporary buffer will be transferred to the on-board memory

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this