Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Extract Audio (PCM) data from IDirectSoundBuffer::Unlock

13 views
Skip to first unread message

Alok

unread,
May 18, 2010, 2:22:01 AM5/18/10
to
Hello,

I have an Application which extract PCM data from two buffers of
IDirectSoundBuffer::Unlock method.

I dumped this audio data and add WAVE Header, and when I play it, a lot of
noises and glitches can be heard.

Currently I am dumping audio data in following sequence.
1. from first buffer of UnLock method.
2. then from second buffer of UnLock method.

Please suggest how can I remove these noises and glitches from this dumped
data.

Alok

unread,
May 20, 2010, 3:11:01 AM5/20/10
to

Hello All,

Syntax of IDirectSoundBuffer::Unlock is

Unlock(pvAudioPtr1,dwAudioBytes1,pvAudioPtr2,dwAudioBytes2)
where,
pvAudioPtr1 & pvAudioPtr2 are pointers to the buffers and dwAudioBytes1 n
dwAudioBytes2 are the size of corresponding buffers.

As per documentation on MSDN the size of valid audio data stored in these
buffers are same as that of dwAudioBytes1 & dwAudioBytes2 .

But when I debugged these buffers, I found that they conatins lot of
unwanted garbage or silence data.

Can any one suggest how to extract only the valid audio data from these
buffers.

0 new messages