mmdevapi: Round buffer size like native in shared mode.
This commit is contained in:
parent
a4dd8fb6a8
commit
fcc9b74cb2
|
@ -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;
|
||||
|
|
|
@ -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){
|
||||
|
|
Loading…
Reference in New Issue