Fixes #14186
a positive HRESULT means it succeeded.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
mtime_t size;
hr = IDirectSoundBuffer_GetStatus( sys->p_dsbuffer, &status );
- if(hr != DS_OK || !(status & DSBSTATUS_PLAYING))
- return 1;
+ if( hr != DS_OK )
+ return hr;
+ if( !(status & DSBSTATUS_PLAYING) )
+ return DSERR_INVALIDCALL ;
hr = IDirectSoundBuffer_GetCurrentPosition( sys->p_dsbuffer, &read, NULL );
if( hr != DS_OK )
/* GetCurrentPosition cannot be trusted if the return doesn't change
* Just return an error */
if( size == 0 )
- return 1;
+ return DSERR_GENERIC ;
else if( size < 0 )
size += DS_BUF_SIZE;