Author: jgmjgm
Date: Dec 24, 2008 19:19
hi all
i use directsound api renderering audio. in my project, i create a position
notify buffer, the buffer size is 76800 byte, and notiy size is 15360 byte
DSBUFFERDESC dsbd;
ZeroMemory( &dsbd, sizeof(DSBUFFERDESC) );
dsbd.dwSize = sizeof(DSBUFFERDESC);
dsbd.dwFlags = DSBCAPS_CTRLPOSITIONNOTIFY
|DSBCAPS_GETCURRENTPOSITION2
|DSBCAPS_GLOBALFOCUS ;
dsbd.dwBufferBytes = m_dwBufferSize;
dsbd.lpwfxFormat = &(m_pwfxInput->Format);
the first time playing a file, my project works ok, but when stop and
play the same file, IDirectSoundBuffer8::GetCurrentPosition return incorrect
positon, the value like following:
108, 292, 0
when the current position smaller than the last report position, i stop my
application, then play, the return posion like that:
236 244 4
|