microsoft.public.win32.programmer.directx.audio
  Home FAQ Contact Sign in
microsoft.public.win32.programmer.directx.audio only
 
Advanced search
December 2008
motuwethfrsasuw
1234567 49
891011121314 50
15161718192021 51
22232425262728 52
293031     1
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
microsoft ... directx.audio Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  IDirectSoundBuffer8::GetCurrentPosition return incorrect positon         


Author: jgm
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
Show full article (1.26Kb)
no comments