winealsa.drv: Fix AudioRenderClient write pointer calculation.

This commit is contained in:
Andrew Eikum 2011-07-27 11:50:42 -05:00 committed by Alexandre Julliard
parent 2077c09b3b
commit 96aa86c99d
1 changed files with 2 additions and 3 deletions

View File

@ -1877,8 +1877,7 @@ static HRESULT WINAPI AudioRenderClient_GetBuffer(IAudioRenderClient *iface,
*data = This->tmp_buffer;
This->buf_state = LOCKED_WRAPPED;
}else{
*data = This->local_buffer +
This->lcl_offs_frames * This->fmt->nBlockAlign;
*data = This->local_buffer + write_pos * This->fmt->nBlockAlign;
This->buf_state = LOCKED_NORMAL;
}
@ -1924,7 +1923,7 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer(
if(This->buf_state == LOCKED_NORMAL)
buffer = This->local_buffer +
This->lcl_offs_frames * This->fmt->nBlockAlign;
(This->lcl_offs_frames + This->held_frames) * This->fmt->nBlockAlign;
else
buffer = This->tmp_buffer;