mmdevapi: Fix stuttering upon start and underrun.

This commit is contained in:
Jörg Höhle 2011-09-20 15:03:52 +02:00 committed by Alexandre Julliard
parent dd0f5377ed
commit 03ad9366f1
2 changed files with 4 additions and 2 deletions

View File

@ -2107,7 +2107,8 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer(
alsa_wrap_buffer(This,
This->tmp_buffer + written * This->fmt->nBlockAlign,
written_frames - written);
else
This->lcl_offs_frames += written;
This->held_frames = written_frames - written;
}
}

View File

@ -1740,7 +1740,8 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer(
if(This->buf_state == LOCKED_WRAPPED)
oss_wrap_buffer(This, This->tmp_buffer + w_bytes,
written_frames - w_frames);
else
This->lcl_offs_frames += w_frames;
This->held_frames = written_frames - w_frames;
}
}