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
57aa9ebc
Commit
57aa9ebc
authored
Jul 16, 2004
by
Francois Gouget
Committed by
Alexandre Julliard
Jul 16, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get and print the DirectSound primary buffer volume.
parent
910b6958
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
dsound.c
dlls/dsound/tests/dsound.c
+9
-2
No files found.
dlls/dsound/tests/dsound.c
View file @
57aa9ebc
...
@@ -543,10 +543,12 @@ static HRESULT test_primary(LPGUID lpGuid)
...
@@ -543,10 +543,12 @@ static HRESULT test_primary(LPGUID lpGuid)
primary
=
NULL
;
primary
=
NULL
;
ZeroMemory
(
&
bufdesc
,
sizeof
(
bufdesc
));
ZeroMemory
(
&
bufdesc
,
sizeof
(
bufdesc
));
bufdesc
.
dwSize
=
sizeof
(
bufdesc
);
bufdesc
.
dwSize
=
sizeof
(
bufdesc
);
bufdesc
.
dwFlags
=
DSBCAPS_PRIMARYBUFFER
;
bufdesc
.
dwFlags
=
DSBCAPS_PRIMARYBUFFER
|
DSBCAPS_CTRLVOLUME
;
rc
=
IDirectSound_CreateSoundBuffer
(
dso
,
&
bufdesc
,
&
primary
,
NULL
);
rc
=
IDirectSound_CreateSoundBuffer
(
dso
,
&
bufdesc
,
&
primary
,
NULL
);
ok
(
rc
==
DS_OK
&&
primary
!=
NULL
,
"CreateSoundBuffer failed to create a primary buffer: 0x%lx
\n
"
,
rc
);
ok
(
rc
==
DS_OK
&&
primary
!=
NULL
,
"CreateSoundBuffer failed to create a primary buffer: 0x%lx
\n
"
,
rc
);
if
(
rc
==
DS_OK
&&
primary
!=
NULL
)
{
if
(
rc
==
DS_OK
&&
primary
!=
NULL
)
{
LONG
vol
;
/* Try to create a second primary buffer */
/* Try to create a second primary buffer */
/* DSOUND: Error: The primary buffer already exists. Any changes made to the buffer description will be ignored. */
/* DSOUND: Error: The primary buffer already exists. Any changes made to the buffer description will be ignored. */
rc
=
IDirectSound_CreateSoundBuffer
(
dso
,
&
bufdesc
,
&
second
,
NULL
);
rc
=
IDirectSound_CreateSoundBuffer
(
dso
,
&
bufdesc
,
&
second
,
NULL
);
...
@@ -560,9 +562,14 @@ static HRESULT test_primary(LPGUID lpGuid)
...
@@ -560,9 +562,14 @@ static HRESULT test_primary(LPGUID lpGuid)
/* rc=0x88780032 */
/* rc=0x88780032 */
ok
(
rc
!=
DS_OK
,
"IDirectSound_DuplicateSoundBuffer primary buffer should have failed 0x%lx
\n
"
,
rc
);
ok
(
rc
!=
DS_OK
,
"IDirectSound_DuplicateSoundBuffer primary buffer should have failed 0x%lx
\n
"
,
rc
);
rc
=
IDirectSoundBuffer_GetVolume
(
primary
,
&
vol
);
ok
(
rc
==
DS_OK
,
"GetVolume failed: 0x%lx
\n
"
,
rc
);
if
(
winetest_interactive
)
if
(
winetest_interactive
)
{
{
trace
(
"Playing a 5 seconds reference tone.
\n
"
);
trace
(
"Playing a 5 seconds reference tone at the current volume.
\n
"
);
if
(
rc
==
DS_OK
)
trace
(
"(the current volume is %ld according to DirectSound)
\n
"
,
vol
);
trace
(
"All subsequent tones should be identical to this one.
\n
"
);
trace
(
"All subsequent tones should be identical to this one.
\n
"
);
trace
(
"Listen for stutter, changes in pitch, volume, etc.
\n
"
);
trace
(
"Listen for stutter, changes in pitch, volume, etc.
\n
"
);
}
}
...
...
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