mmdevapi: Round buffer size like native in shared mode.

This commit is contained in:
Jörg Höhle 2012-01-05 18:56:46 +01:00 committed by Alexandre Julliard
parent a4dd8fb6a8
commit fcc9b74cb2
2 changed files with 2 additions and 2 deletions

View File

@ -1006,7 +1006,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
This->period_ms = period / 10000;
This->bufsize_frames = ceil(fmt->nSamplesPerSec * (duration / 10000000.));
This->bufsize_frames = MulDiv(duration, fmt->nSamplesPerSec, 10000000);
if(This->dataflow == eCapture){
int i;

View File

@ -956,7 +956,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
This->period_us = period / 10;
This->bufsize_frames = ceil(fmt->nSamplesPerSec * (duration / 10000000.));
This->bufsize_frames = MulDiv(duration, fmt->nSamplesPerSec, 10000000);
This->local_buffer = HeapAlloc(GetProcessHeap(), 0,
This->bufsize_frames * fmt->nBlockAlign);
if(!This->local_buffer){