Commit ea47c12e authored by Jörg Höhle's avatar Jörg Höhle Committed by Alexandre Julliard

wineoss.drv: Fix AudioRenderClient write pointer calculation.

parent 47bc6223
...@@ -1611,8 +1611,7 @@ static HRESULT WINAPI AudioRenderClient_GetBuffer(IAudioRenderClient *iface, ...@@ -1611,8 +1611,7 @@ static HRESULT WINAPI AudioRenderClient_GetBuffer(IAudioRenderClient *iface,
*data = This->tmp_buffer; *data = This->tmp_buffer;
This->buf_state = LOCKED_WRAPPED; This->buf_state = LOCKED_WRAPPED;
}else{ }else{
*data = This->local_buffer + *data = This->local_buffer + write_pos * This->fmt->nBlockAlign;
This->lcl_offs_frames * This->fmt->nBlockAlign;
This->buf_state = LOCKED_NORMAL; This->buf_state = LOCKED_NORMAL;
} }
...@@ -1656,8 +1655,8 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer( ...@@ -1656,8 +1655,8 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer(
} }
if(This->buf_state == LOCKED_NORMAL) if(This->buf_state == LOCKED_NORMAL)
buffer = This->local_buffer + buffer = This->local_buffer + This->fmt->nBlockAlign *
This->lcl_offs_frames * This->fmt->nBlockAlign; ((This->lcl_offs_frames + This->held_frames) % This->bufsize_frames);
else else
buffer = This->tmp_buffer; buffer = This->tmp_buffer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment