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

mmdevapi: Round buffer size like native in shared mode.

parent a4dd8fb6
...@@ -1006,7 +1006,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface, ...@@ -1006,7 +1006,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
This->period_ms = period / 10000; 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){ if(This->dataflow == eCapture){
int i; int i;
......
...@@ -956,7 +956,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface, ...@@ -956,7 +956,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
This->period_us = period / 10; 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->local_buffer = HeapAlloc(GetProcessHeap(), 0,
This->bufsize_frames * fmt->nBlockAlign); This->bufsize_frames * fmt->nBlockAlign);
if(!This->local_buffer){ if(!This->local_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