winealsa.drv: Fix AudioRenderClient write pointer calculation.
This commit is contained in:
parent
2077c09b3b
commit
96aa86c99d
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue