I need to play the PCM audio date from IWMReaderCallback::OnSample, when I use " waveOutXXX " it can work,but when I try to change volume with " waveOutSetVolume " , system wave volume is changed,this is not what I want . I wish to change the volume of wave date by operation before I play it with " waveOutXXX " , but I can not find the arithmetic, so I changed to use " DirectSound " to play it, the volume can be controled as expected, but even more worse thing happened, when first data block from "OnSample" arrived, I fill it to " DirectSoundBuffer " ( use Stream buffer),and begin to play it, for example: the length of the first data block is 14000, but when I try to fill the second data block to buffer when it arrived, I found that the read pointer of the buffer is at 13000, but the write pointer is already reached at 15000 , this result that I can not fill the buffer between 14000 and 15000, so the sound is not consecutive at all , the noise is exist obviously when I play it. bcz I am using Windows Media Service and it use push mode, so I can not control the speed of " IWMReaderCallback::OnSample " . any way to resolve this problem thanks a lot!

Help me about rendering audio from IWMReaderCallback::OnSample using DirectSound
SLang
jewelfire
If I fill the buffer with silence data and start to play before IWMReaderCallback::OnSample is called, it can work without noise because the write pointer will never exceed the position of my last filling. But the audio will always be delayed than the video because I had play silence data when the first video is rendered.
So, can you tell me how to get some audio data before start to play, i.e. before IWMReaderCallback::OnSample is called Or can you tell me the arithmetic to modify the volume of PCM data
Thanks a lot.
Random Bill
Wow, a crying emoticon. That's a first in this forum :-)
Anyways, from what I understand, you'd really like to do some processing on the audio bits you receive, and failing that, you're having some problems with DirectSound. Since these aren't Media Foundation questions, you probably want to try posting them here: http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=351&SiteID=1
Manoj Verma