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
50dc513b
Commit
50dc513b
authored
Feb 10, 2005
by
Robert Reif
Committed by
Alexandre Julliard
Feb 10, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print info about primary buffer format.
parent
8efb8794
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
14 deletions
+48
-14
ds3d.c
dlls/dsound/tests/ds3d.c
+12
-3
ds3d8.c
dlls/dsound/tests/ds3d8.c
+12
-3
dsound.c
dlls/dsound/tests/dsound.c
+12
-4
dsound8.c
dlls/dsound/tests/dsound8.c
+12
-4
No files found.
dlls/dsound/tests/ds3d.c
View file @
50dc513b
...
...
@@ -628,7 +628,7 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
LPDIRECTSOUNDBUFFER
primary
=
NULL
,
secondary
=
NULL
;
LPDIRECTSOUND3DLISTENER
listener
=
NULL
;
DSBUFFERDESC
bufdesc
;
WAVEFORMATEX
wfx
;
WAVEFORMATEX
wfx
,
wfx1
;
int
ref
;
/* Create the DirectSound object */
...
...
@@ -659,6 +659,12 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
DXGetErrorString8
(
rc
));
if
(
rc
==
DS_OK
&&
primary
!=
NULL
)
{
rc
=
IDirectSoundBuffer_GetFormat
(
primary
,
&
wfx1
,
sizeof
(
wfx1
),
NULL
);
ok
(
rc
==
DS_OK
,
"IDirectSoundBuffer8_Getformat() failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
rc
!=
DS_OK
)
goto
EXIT1
;
if
(
has_listener
)
{
rc
=
IDirectSoundBuffer_QueryInterface
(
primary
,
&
IID_IDirectSound3DListener
,
...
...
@@ -710,7 +716,8 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
bufdesc
.
dwBufferBytes
=
wfx
.
nAvgBytesPerSec
*
BUFFER_LEN
/
1000
;
bufdesc
.
lpwfxFormat
=&
wfx
;
if
(
winetest_interactive
)
{
trace
(
" Testing a %s%ssecondary buffer %s%s%s%sat %ldx%dx%d
\n
"
,
trace
(
" Testing a %s%ssecondary buffer %s%s%s%sat %ldx%dx%d "
"with a primary buffer at %ldx%dx%d
\n
"
,
has_3dbuffer
?
"3D "
:
""
,
has_duplicate
?
"duplicated "
:
""
,
listener
!=
NULL
||
move_sound
?
"with "
:
""
,
...
...
@@ -718,7 +725,8 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
listener
!=
NULL
?
"listener "
:
""
,
listener
&&
move_sound
?
"and moving sound "
:
move_sound
?
"moving sound "
:
""
,
wfx
.
nSamplesPerSec
,
wfx
.
wBitsPerSample
,
wfx
.
nChannels
);
wfx
.
nSamplesPerSec
,
wfx
.
wBitsPerSample
,
wfx
.
nChannels
,
wfx1
.
nSamplesPerSec
,
wfx1
.
wBitsPerSample
,
wfx1
.
nChannels
);
}
rc
=
IDirectSound_CreateSoundBuffer
(
dso
,
&
bufdesc
,
&
secondary
,
NULL
);
ok
(
rc
==
DS_OK
&&
secondary
!=
NULL
,
"IDirectSound_CreateSoundBuffer() "
...
...
@@ -839,6 +847,7 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
}
}
}
EXIT1:
if
(
has_listener
)
{
ref
=
IDirectSound3DListener_Release
(
listener
);
ok
(
ref
==
0
,
"IDirectSound3dListener_Release() listener has %d "
...
...
dlls/dsound/tests/ds3d8.c
View file @
50dc513b
...
...
@@ -530,7 +530,7 @@ static HRESULT test_secondary8(LPGUID lpGuid, int play,
LPDIRECTSOUNDBUFFER
primary
=
NULL
,
secondary
=
NULL
;
LPDIRECTSOUND3DLISTENER
listener
=
NULL
;
DSBUFFERDESC
bufdesc
;
WAVEFORMATEX
wfx
;
WAVEFORMATEX
wfx
,
wfx1
;
int
ref
;
/* Create the DirectSound object */
...
...
@@ -561,6 +561,12 @@ static HRESULT test_secondary8(LPGUID lpGuid, int play,
DXGetErrorString8
(
rc
));
if
(
rc
==
DS_OK
&&
primary
!=
NULL
)
{
rc
=
IDirectSoundBuffer_GetFormat
(
primary
,
&
wfx1
,
sizeof
(
wfx1
),
NULL
);
ok
(
rc
==
DS_OK
,
"IDirectSoundBuffer8_Getformat() failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
rc
!=
DS_OK
)
goto
EXIT1
;
if
(
has_listener
)
{
rc
=
IDirectSoundBuffer_QueryInterface
(
primary
,
&
IID_IDirectSound3DListener
,
...
...
@@ -624,7 +630,8 @@ static HRESULT test_secondary8(LPGUID lpGuid, int play,
}
if
(
winetest_interactive
)
{
trace
(
" Testing a %s%ssecondary buffer %s%s%s%sat %ldx%dx%d
\n
"
,
trace
(
" Testing a %s%ssecondary buffer %s%s%s%sat %ldx%dx%d "
"with a primary buffer at %ldx%dx%d
\n
"
,
has_3dbuffer
?
"3D "
:
""
,
has_duplicate
?
"duplicated "
:
""
,
listener
!=
NULL
||
move_sound
?
"with "
:
""
,
...
...
@@ -632,7 +639,8 @@ static HRESULT test_secondary8(LPGUID lpGuid, int play,
listener
!=
NULL
?
"listener "
:
""
,
listener
&&
move_sound
?
"and moving sound "
:
move_sound
?
"moving sound "
:
""
,
wfx
.
nSamplesPerSec
,
wfx
.
wBitsPerSample
,
wfx
.
nChannels
);
wfx
.
nSamplesPerSec
,
wfx
.
wBitsPerSample
,
wfx
.
nChannels
,
wfx1
.
nSamplesPerSec
,
wfx1
.
wBitsPerSample
,
wfx1
.
nChannels
);
}
rc
=
IDirectSound8_CreateSoundBuffer
(
dso
,
&
bufdesc
,
&
secondary
,
NULL
);
ok
(
rc
==
DS_OK
&&
secondary
!=
NULL
,
"IDirectSound8_CreateSoundBuffer() "
...
...
@@ -753,6 +761,7 @@ static HRESULT test_secondary8(LPGUID lpGuid, int play,
}
}
}
EXIT1:
if
(
has_listener
)
{
ref
=
IDirectSound3DListener_Release
(
listener
);
ok
(
ref
==
0
,
"IDirectSound3dListener_Release() listener has %d "
...
...
dlls/dsound/tests/dsound.c
View file @
50dc513b
...
...
@@ -623,7 +623,7 @@ static HRESULT test_secondary(LPGUID lpGuid)
LPDIRECTSOUNDBUFFER
primary
=
NULL
,
secondary
=
NULL
;
DSBUFFERDESC
bufdesc
;
DSCAPS
dscaps
;
WAVEFORMATEX
wfx
;
WAVEFORMATEX
wfx
,
wfx1
;
DWORD
f
;
int
ref
;
...
...
@@ -659,6 +659,12 @@ static HRESULT test_secondary(LPGUID lpGuid)
"%s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
rc
==
DS_OK
&&
primary
!=
NULL
)
{
rc
=
IDirectSoundBuffer_GetFormat
(
primary
,
&
wfx1
,
sizeof
(
wfx1
),
NULL
);
ok
(
rc
==
DS_OK
,
"IDirectSoundBuffer8_Getformat() failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
rc
!=
DS_OK
)
goto
EXIT1
;
for
(
f
=
0
;
f
<
NB_FORMATS
;
f
++
)
{
init_format
(
&
wfx
,
WAVE_FORMAT_PCM
,
formats
[
f
][
0
],
formats
[
f
][
1
],
formats
[
f
][
2
]);
...
...
@@ -681,8 +687,10 @@ static HRESULT test_secondary(LPGUID lpGuid)
bufdesc
.
dwBufferBytes
=
wfx
.
nAvgBytesPerSec
*
BUFFER_LEN
/
1000
;
bufdesc
.
lpwfxFormat
=&
wfx
;
if
(
winetest_interactive
)
{
trace
(
" Testing a secondary buffer at %ldx%dx%d
\n
"
,
wfx
.
nSamplesPerSec
,
wfx
.
wBitsPerSample
,
wfx
.
nChannels
);
trace
(
" Testing a secondary buffer at %ldx%dx%d "
"with a primary buffer at %ldx%dx%d
\n
"
,
wfx
.
nSamplesPerSec
,
wfx
.
wBitsPerSample
,
wfx
.
nChannels
,
wfx1
.
nSamplesPerSec
,
wfx1
.
wBitsPerSample
,
wfx1
.
nChannels
);
}
rc
=
IDirectSound_CreateSoundBuffer
(
dso
,
&
bufdesc
,
&
secondary
,
NULL
);
ok
(
rc
==
DS_OK
&&
secondary
!=
NULL
,
...
...
@@ -698,7 +706,7 @@ static HRESULT test_secondary(LPGUID lpGuid)
"should have 0
\n
"
,
ref
);
}
}
EXIT1:
ref
=
IDirectSoundBuffer_Release
(
primary
);
ok
(
ref
==
0
,
"IDirectSoundBuffer_Release() primary has %d references, "
"should have 0
\n
"
,
ref
);
...
...
dlls/dsound/tests/dsound8.c
View file @
50dc513b
...
...
@@ -644,7 +644,7 @@ static HRESULT test_secondary8(LPGUID lpGuid)
LPDIRECTSOUNDBUFFER
primary
=
NULL
,
secondary
=
NULL
;
DSBUFFERDESC
bufdesc
;
DSCAPS
dscaps
;
WAVEFORMATEX
wfx
;
WAVEFORMATEX
wfx
,
wfx1
;
DWORD
f
;
int
ref
;
...
...
@@ -680,6 +680,12 @@ static HRESULT test_secondary8(LPGUID lpGuid)
"%s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
rc
==
DS_OK
&&
primary
!=
NULL
)
{
rc
=
IDirectSoundBuffer_GetFormat
(
primary
,
&
wfx1
,
sizeof
(
wfx1
),
NULL
);
ok
(
rc
==
DS_OK
,
"IDirectSoundBuffer8_Getformat() failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
rc
!=
DS_OK
)
goto
EXIT1
;
for
(
f
=
0
;
f
<
NB_FORMATS
;
f
++
)
{
init_format
(
&
wfx
,
WAVE_FORMAT_PCM
,
formats
[
f
][
0
],
formats
[
f
][
1
],
formats
[
f
][
2
]);
...
...
@@ -702,8 +708,10 @@ static HRESULT test_secondary8(LPGUID lpGuid)
bufdesc
.
dwBufferBytes
=
wfx
.
nAvgBytesPerSec
*
BUFFER_LEN
/
1000
;
bufdesc
.
lpwfxFormat
=&
wfx
;
if
(
winetest_interactive
)
{
trace
(
" Testing a secondary buffer at %ldx%dx%d
\n
"
,
wfx
.
nSamplesPerSec
,
wfx
.
wBitsPerSample
,
wfx
.
nChannels
);
trace
(
" Testing a secondary buffer at %ldx%dx%d "
"with a primary buffer at %ldx%dx%d
\n
"
,
wfx
.
nSamplesPerSec
,
wfx
.
wBitsPerSample
,
wfx
.
nChannels
,
wfx1
.
nSamplesPerSec
,
wfx1
.
wBitsPerSample
,
wfx1
.
nChannels
);
}
rc
=
IDirectSound8_CreateSoundBuffer
(
dso
,
&
bufdesc
,
&
secondary
,
NULL
);
ok
(
rc
==
DS_OK
&&
secondary
!=
NULL
,
...
...
@@ -719,7 +727,7 @@ static HRESULT test_secondary8(LPGUID lpGuid)
"should have 0
\n
"
,
ref
);
}
}
EXIT1:
ref
=
IDirectSoundBuffer_Release
(
primary
);
ok
(
ref
==
0
,
"IDirectSoundBuffer_Release() primary has %d references, "
"should have 0
\n
"
,
ref
);
...
...
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