Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
80fd691e
Commit
80fd691e
authored
Jul 18, 2011
by
Andrew Eikum
Committed by
Alexandre Julliard
Jul 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Use a sane default if no buffer size is requested.
parent
9a30a29d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
0 deletions
+15
-0
render.c
dlls/mmdevapi/tests/render.c
+9
-0
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 @
80fd691e
...
...
@@ -211,6 +211,15 @@ static void test_audioclient(void)
hr
=
IAudioClient_Initialize
(
ac
,
AUDCLNT_SHAREMODE_SHARED
,
0
,
5000000
,
0
,
NULL
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Initialize with null format returns %08x
\n
"
,
hr
);
hr
=
IAudioClient_Initialize
(
ac
,
AUDCLNT_SHAREMODE_SHARED
,
0
,
0
,
0
,
pwfx
,
NULL
);
ok
(
hr
==
S_OK
,
"Initialize with 0 buffer size returns %08x
\n
"
,
hr
);
IAudioClient_Release
(
ac
);
hr
=
IMMDevice_Activate
(
dev
,
&
IID_IAudioClient
,
CLSCTX_INPROC_SERVER
,
NULL
,
(
void
**
)
&
ac
);
ok
(
hr
==
S_OK
,
"Activation failed with %08x
\n
"
,
hr
);
hr
=
IAudioClient_Initialize
(
ac
,
AUDCLNT_SHAREMODE_SHARED
,
0
,
5000000
,
0
,
pwfx
,
NULL
);
ok
(
hr
==
S_OK
,
"Valid Initialize returns %08x
\n
"
,
hr
);
...
...
dlls/winealsa.drv/mmdevdrv.c
View file @
80fd691e
...
...
@@ -799,6 +799,8 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
goto
exit
;
}
if
(
!
duration
)
duration
=
300000
;
/* 0.03s */
This
->
bufsize_frames
=
ceil
((
duration
/
10000000
.)
*
fmt
->
nSamplesPerSec
);
This
->
local_buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
bufsize_frames
*
fmt
->
nBlockAlign
);
...
...
dlls/winecoreaudio.drv/mmdevdrv.c
View file @
80fd691e
...
...
@@ -862,6 +862,8 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
}
else
This
->
period_ms
=
MinimumPeriod
/
10000
;
if
(
!
duration
)
duration
=
300000
;
/* 0.03s */
This
->
bufsize_frames
=
ceil
(
fmt
->
nSamplesPerSec
*
(
duration
/
10000000
.));
if
(
This
->
dataflow
==
eCapture
){
...
...
dlls/wineoss.drv/mmdevdrv.c
View file @
80fd691e
...
...
@@ -819,6 +819,8 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
else
This
->
period_us
=
DefaultPeriod
/
10
;
if
(
!
duration
)
duration
=
300000
;
/* 0.03s */
This
->
bufsize_frames
=
ceil
(
fmt
->
nSamplesPerSec
*
(
duration
/
10000000
.));
This
->
local_buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
bufsize_frames
*
fmt
->
nBlockAlign
);
...
...
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