xaudio2: Implement IXAudio2SourceVoice::Discontinuity.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
This commit is contained in:
Andrew Eikum 2015-09-28 13:56:14 -05:00 committed by Alexandre Julliard
parent 8366165e40
commit b0a9d16cfb
1 changed files with 11 additions and 0 deletions

View File

@ -748,7 +748,18 @@ static HRESULT WINAPI XA2SRC_FlushSourceBuffers(IXAudio2SourceVoice *iface)
static HRESULT WINAPI XA2SRC_Discontinuity(IXAudio2SourceVoice *iface)
{
XA2SourceImpl *This = impl_from_IXAudio2SourceVoice(iface);
TRACE("%p\n", This);
EnterCriticalSection(&This->lock);
if(This->nbufs > 0){
DWORD last = (This->first_buf + This->nbufs - 1) % XAUDIO2_MAX_QUEUED_BUFFERS;
This->buffers[last].xa2buffer.Flags |= XAUDIO2_END_OF_STREAM;
}
LeaveCriticalSection(&This->lock);
return S_OK;
}