directsound: remove broken notification support
The original code was non-working because the notication was never
setup correctly and resulted in a DSERR_INVALIDCALL. A proper fix
would look like:
if( sys->p_notify )
{
+ IDirectSoundBuffer_Stop( aout->sys->p_dsbuffer );
DSBPOSITIONNOTIFY notif = {.dwOffset = aout->sys->i_write, .hEventNotify = sys->hnotify_evt } ;
if( IDirectSoundNotify_SetNotificationPositions( sys->p_notify, 1, ¬if ) == DS_OK )
{
+ IDirectSoundBuffer_Play( aout->sys->p_dsbuffer, 0, 0, DSBPLAY_LOOPING );
WaitForSingleObject( sys->hnotify_evt, INFINITE );
IDirectSoundBuffer_Stop( aout->sys->p_dsbuffer );
}
But fixing it makes the problem worse since the notification is setup
too late and thus the buffer will replay a full loop of the back
buffer during a drain.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Showing
Please register or sign in to comment