Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
b634666e
Commit
b634666e
authored
May 19, 2014
by
Andrew Eikum
Committed by
Alexandre Julliard
May 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Make buffer size divisible by number of periods.
parent
e6f816c9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
1 deletion
+7
-1
render.c
dlls/mmdevapi/tests/render.c
+1
-1
mmdevdrv.c
dlls/winealsa.drv/mmdevdrv.c
+2
-0
mmdevdrv.c
dlls/winecoreaudio.drv/mmdevdrv.c
+2
-0
mmdevdrv.c
dlls/wineoss.drv/mmdevdrv.c
+2
-0
No files found.
dlls/mmdevapi/tests/render.c
View file @
b634666e
...
...
@@ -935,7 +935,7 @@ static void test_clock(int share)
if
(
share
)
ok
(
gbsize
==
bufsize
,
"BufferSize %u at rate %u
\n
"
,
gbsize
,
pwfx
->
nSamplesPerSec
);
else
todo_wine
else
ok
(
gbsize
==
parts
*
fragment
||
gbsize
==
MulDiv
(
bufsize
,
1
,
1024
)
*
1024
,
"BufferSize %u misfits fragment size %u at rate %u
\n
"
,
gbsize
,
fragment
,
pwfx
->
nSamplesPerSec
);
...
...
dlls/winealsa.drv/mmdevdrv.c
View file @
b634666e
...
...
@@ -1416,6 +1416,8 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
* ALSA period 220 vs. 221 frames in mmdevapi and
* buffer 883 vs. 2205 frames in mmdevapi! */
This
->
bufsize_frames
=
MulDiv
(
duration
,
fmt
->
nSamplesPerSec
,
10000000
);
if
(
mode
==
AUDCLNT_SHAREMODE_EXCLUSIVE
)
This
->
bufsize_frames
-=
This
->
bufsize_frames
%
This
->
mmdev_period_frames
;
This
->
hidden_frames
=
This
->
alsa_period_frames
+
This
->
mmdev_period_frames
+
MulDiv
(
fmt
->
nSamplesPerSec
,
EXTRA_SAFE_RT
,
10000000
);
...
...
dlls/winecoreaudio.drv/mmdevdrv.c
View file @
b634666e
...
...
@@ -1235,6 +1235,8 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
This
->
period_frames
=
MulDiv
(
period
,
This
->
fmt
->
nSamplesPerSec
,
10000000
);
This
->
bufsize_frames
=
MulDiv
(
duration
,
fmt
->
nSamplesPerSec
,
10000000
);
if
(
mode
==
AUDCLNT_SHAREMODE_EXCLUSIVE
)
This
->
bufsize_frames
-=
This
->
bufsize_frames
%
This
->
period_frames
;
if
(
This
->
dataflow
==
eCapture
){
int
i
,
nbuffs
=
(
This
->
bufsize_frames
/
This
->
period_frames
)
+
1
;
...
...
dlls/wineoss.drv/mmdevdrv.c
View file @
b634666e
...
...
@@ -1099,6 +1099,8 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
This
->
period_frames
=
MulDiv
(
fmt
->
nSamplesPerSec
,
period
,
10000000
);
This
->
bufsize_frames
=
MulDiv
(
duration
,
fmt
->
nSamplesPerSec
,
10000000
);
if
(
mode
==
AUDCLNT_SHAREMODE_EXCLUSIVE
)
This
->
bufsize_frames
-=
This
->
bufsize_frames
%
This
->
period_frames
;
This
->
local_buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
bufsize_frames
*
fmt
->
nBlockAlign
);
if
(
!
This
->
local_buffer
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment