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
a94395f5
Commit
a94395f5
authored
Apr 19, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Apr 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Implement some methods in audioclient.
parent
416f0156
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
53 deletions
+53
-53
audio.c
dlls/mmdevapi/audio.c
+0
-0
capture.c
dlls/mmdevapi/tests/capture.c
+27
-27
render.c
dlls/mmdevapi/tests/render.c
+26
-26
No files found.
dlls/mmdevapi/audio.c
View file @
a94395f5
This diff is collapsed.
Click to expand it.
dlls/mmdevapi/tests/capture.c
View file @
a94395f5
...
...
@@ -81,7 +81,7 @@ static void test_capture(IAudioClient *ac, HANDLE handle, WAVEFORMATEX *wfx)
UINT64
devpos
,
qpcpos
;
hr
=
IAudioClient_GetService
(
ac
,
&
IID_IAudioCaptureClient
,
(
void
**
)
&
acc
);
ok
(
hr
==
S_OK
,
"IAudioClient_GetService(IID_IAudioCaptureClient) returns %08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
,
"IAudioClient_GetService(IID_IAudioCaptureClient) returns %08x
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
return
;
...
...
@@ -174,13 +174,13 @@ static void test_audioclient(IAudioClient *ac)
ok
(
hr
==
E_POINTER
,
"Invalid GetDevicePeriod call returns %08x
\n
"
,
hr
);
hr
=
IAudioClient_GetDevicePeriod
(
ac
,
&
t1
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Valid GetDevicePeriod call returns %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Valid GetDevicePeriod call returns %08x
\n
"
,
hr
);
hr
=
IAudioClient_GetDevicePeriod
(
ac
,
NULL
,
&
t2
);
todo_wine
ok
(
hr
==
S_OK
,
"Valid GetDevicePeriod call returns %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Valid GetDevicePeriod call returns %08x
\n
"
,
hr
);
hr
=
IAudioClient_GetDevicePeriod
(
ac
,
&
t1
,
&
t2
);
todo_wine
ok
(
hr
==
S_OK
,
"Valid GetDevicePeriod call returns %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Valid GetDevicePeriod call returns %08x
\n
"
,
hr
);
trace
(
"Returned periods: %u.%05u ms %u.%05u ms
\n
"
,
(
UINT
)(
t1
/
10000
),
(
UINT
)(
t1
%
10000
),
(
UINT
)(
t2
/
10000
),
(
UINT
)(
t2
%
10000
));
...
...
@@ -189,28 +189,28 @@ static void test_audioclient(IAudioClient *ac)
ok
(
hr
==
E_POINTER
,
"GetMixFormat returns %08x
\n
"
,
hr
);
hr
=
IAudioClient_GetMixFormat
(
ac
,
&
pwfx
);
todo_wine
ok
(
hr
==
S_OK
,
"Valid GetMixFormat returns %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Valid GetMixFormat returns %08x
\n
"
,
hr
);
trace
(
"Tag: %04x
\n
"
,
pwfx
->
wFormatTag
);
trace
(
"bits: %u
\n
"
,
pwfx
->
wBitsPerSample
);
trace
(
"chan: %u
\n
"
,
pwfx
->
nChannels
);
trace
(
"rate: %u
\n
"
,
pwfx
->
nSamplesPerSec
);
trace
(
"align: %u
\n
"
,
pwfx
->
nBlockAlign
);
trace
(
"extra: %u
\n
"
,
pwfx
->
cbSize
);
ok
(
pwfx
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
,
"wFormatTag is %x
\n
"
,
pwfx
->
wFormatTag
);
if
(
pwfx
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
)
{
WAVEFORMATEXTENSIBLE
*
pwfxe
=
(
void
*
)
pwfx
;
trace
(
"Res: %u
\n
"
,
pwfxe
->
Samples
.
wReserved
);
trace
(
"Mask: %x
\n
"
,
pwfxe
->
dwChannelMask
);
trace
(
"Alg: %s
\n
"
,
IsEqualGUID
(
&
pwfxe
->
SubFormat
,
&
KSDATAFORMAT_SUBTYPE_PCM
)
?
"PCM"
:
(
IsEqualGUID
(
&
pwfxe
->
SubFormat
,
&
KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
)
?
"FLOAT"
:
"Other"
));
}
if
(
hr
==
S_OK
)
{
trace
(
"Tag: %04x
\n
"
,
pwfx
->
wFormatTag
);
trace
(
"bits: %u
\n
"
,
pwfx
->
wBitsPerSample
);
trace
(
"chan: %u
\n
"
,
pwfx
->
nChannels
);
trace
(
"rate: %u
\n
"
,
pwfx
->
nSamplesPerSec
);
trace
(
"align: %u
\n
"
,
pwfx
->
nBlockAlign
);
trace
(
"extra: %u
\n
"
,
pwfx
->
cbSize
);
ok
(
pwfx
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
,
"wFormatTag is %x
\n
"
,
pwfx
->
wFormatTag
);
if
(
pwfx
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
)
{
WAVEFORMATEXTENSIBLE
*
pwfxe
=
(
void
*
)
pwfx
;
trace
(
"Res: %u
\n
"
,
pwfxe
->
Samples
.
wReserved
);
trace
(
"Mask: %x
\n
"
,
pwfxe
->
dwChannelMask
);
trace
(
"Alg: %s
\n
"
,
IsEqualGUID
(
&
pwfxe
->
SubFormat
,
&
KSDATAFORMAT_SUBTYPE_PCM
)
?
"PCM"
:
(
IsEqualGUID
(
&
pwfxe
->
SubFormat
,
&
KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
)
?
"FLOAT"
:
"Other"
));
}
hr
=
IAudioClient_IsFormatSupported
(
ac
,
AUDCLNT_SHAREMODE_SHARED
,
pwfx
,
&
pwfx2
);
ok
(
hr
==
S_OK
,
"Valid IsFormatSupported(Shared) call returns %08x
\n
"
,
hr
);
ok
(
pwfx2
==
NULL
,
"pwfx2 is non-null
\n
"
);
...
...
@@ -236,19 +236,19 @@ static void test_audioclient(IAudioClient *ac)
test_uninitialized
(
ac
);
hr
=
IAudioClient_Initialize
(
ac
,
3
,
0
,
5000000
,
0
,
pwfx
,
NULL
);
todo_wine
ok
(
hr
==
AUDCLNT_E_NOT_INITIALIZED
,
"Initialize with invalid sharemode returns %08x
\n
"
,
hr
);
ok
(
hr
==
AUDCLNT_E_NOT_INITIALIZED
,
"Initialize with invalid sharemode returns %08x
\n
"
,
hr
);
hr
=
IAudioClient_Initialize
(
ac
,
AUDCLNT_SHAREMODE_SHARED
,
0xffffffff
,
5000000
,
0
,
pwfx
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Initialize with invalid flags returns %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Initialize with invalid flags returns %08x
\n
"
,
hr
);
/* It seems that if length > 2s or periodicity != 0 the length is ignored and call succeeds
* Since we can only initialize succesfully once skip those tests
*/
hr
=
IAudioClient_Initialize
(
ac
,
AUDCLNT_SHAREMODE_SHARED
,
0
,
5000000
,
0
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"Initialize with null format returns %08x
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"Initialize with null format returns %08x
\n
"
,
hr
);
hr
=
IAudioClient_Initialize
(
ac
,
AUDCLNT_SHAREMODE_SHARED
,
AUDCLNT_STREAMFLAGS_EVENTCALLBACK
,
5000000
,
0
,
pwfx
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Valid Initialize returns %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Valid Initialize returns %08x
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
{
...
...
dlls/mmdevapi/tests/render.c
View file @
a94395f5
...
...
@@ -109,13 +109,13 @@ static void test_audioclient(IAudioClient *ac)
ok
(
hr
==
E_POINTER
,
"Invalid GetDevicePeriod call returns %08x
\n
"
,
hr
);
hr
=
IAudioClient_GetDevicePeriod
(
ac
,
&
t1
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Valid GetDevicePeriod call returns %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Valid GetDevicePeriod call returns %08x
\n
"
,
hr
);
hr
=
IAudioClient_GetDevicePeriod
(
ac
,
NULL
,
&
t2
);
todo_wine
ok
(
hr
==
S_OK
,
"Valid GetDevicePeriod call returns %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Valid GetDevicePeriod call returns %08x
\n
"
,
hr
);
hr
=
IAudioClient_GetDevicePeriod
(
ac
,
&
t1
,
&
t2
);
todo_wine
ok
(
hr
==
S_OK
,
"Valid GetDevicePeriod call returns %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Valid GetDevicePeriod call returns %08x
\n
"
,
hr
);
trace
(
"Returned periods: %u.%05u ms %u.%05u ms
\n
"
,
(
UINT
)(
t1
/
10000
),
(
UINT
)(
t1
%
10000
),
(
UINT
)(
t2
/
10000
),
(
UINT
)(
t2
%
10000
));
...
...
@@ -124,28 +124,28 @@ static void test_audioclient(IAudioClient *ac)
ok
(
hr
==
E_POINTER
,
"GetMixFormat returns %08x
\n
"
,
hr
);
hr
=
IAudioClient_GetMixFormat
(
ac
,
&
pwfx
);
todo_wine
ok
(
hr
==
S_OK
,
"Valid GetMixFormat returns %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Valid GetMixFormat returns %08x
\n
"
,
hr
);
trace
(
"Tag: %04x
\n
"
,
pwfx
->
wFormatTag
);
trace
(
"bits: %u
\n
"
,
pwfx
->
wBitsPerSample
);
trace
(
"chan: %u
\n
"
,
pwfx
->
nChannels
);
trace
(
"rate: %u
\n
"
,
pwfx
->
nSamplesPerSec
);
trace
(
"align: %u
\n
"
,
pwfx
->
nBlockAlign
);
trace
(
"extra: %u
\n
"
,
pwfx
->
cbSize
);
ok
(
pwfx
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
,
"wFormatTag is %x
\n
"
,
pwfx
->
wFormatTag
);
if
(
pwfx
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
)
{
WAVEFORMATEXTENSIBLE
*
pwfxe
=
(
void
*
)
pwfx
;
trace
(
"Res: %u
\n
"
,
pwfxe
->
Samples
.
wReserved
);
trace
(
"Mask: %x
\n
"
,
pwfxe
->
dwChannelMask
);
trace
(
"Alg: %s
\n
"
,
IsEqualGUID
(
&
pwfxe
->
SubFormat
,
&
KSDATAFORMAT_SUBTYPE_PCM
)
?
"PCM"
:
(
IsEqualGUID
(
&
pwfxe
->
SubFormat
,
&
KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
)
?
"FLOAT"
:
"Other"
));
}
if
(
hr
==
S_OK
)
{
trace
(
"Tag: %04x
\n
"
,
pwfx
->
wFormatTag
);
trace
(
"bits: %u
\n
"
,
pwfx
->
wBitsPerSample
);
trace
(
"chan: %u
\n
"
,
pwfx
->
nChannels
);
trace
(
"rate: %u
\n
"
,
pwfx
->
nSamplesPerSec
);
trace
(
"align: %u
\n
"
,
pwfx
->
nBlockAlign
);
trace
(
"extra: %u
\n
"
,
pwfx
->
cbSize
);
ok
(
pwfx
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
,
"wFormatTag is %x
\n
"
,
pwfx
->
wFormatTag
);
if
(
pwfx
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
)
{
WAVEFORMATEXTENSIBLE
*
pwfxe
=
(
void
*
)
pwfx
;
trace
(
"Res: %u
\n
"
,
pwfxe
->
Samples
.
wReserved
);
trace
(
"Mask: %x
\n
"
,
pwfxe
->
dwChannelMask
);
trace
(
"Alg: %s
\n
"
,
IsEqualGUID
(
&
pwfxe
->
SubFormat
,
&
KSDATAFORMAT_SUBTYPE_PCM
)
?
"PCM"
:
(
IsEqualGUID
(
&
pwfxe
->
SubFormat
,
&
KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
)
?
"FLOAT"
:
"Other"
));
}
hr
=
IAudioClient_IsFormatSupported
(
ac
,
AUDCLNT_SHAREMODE_SHARED
,
pwfx
,
&
pwfx2
);
ok
(
hr
==
S_OK
,
"Valid IsFormatSupported(Shared) call returns %08x
\n
"
,
hr
);
ok
(
pwfx2
==
NULL
,
"pwfx2 is non-null
\n
"
);
...
...
@@ -171,19 +171,19 @@ static void test_audioclient(IAudioClient *ac)
test_uninitialized
(
ac
);
hr
=
IAudioClient_Initialize
(
ac
,
3
,
0
,
5000000
,
0
,
pwfx
,
NULL
);
todo_wine
ok
(
hr
==
AUDCLNT_E_NOT_INITIALIZED
,
"Initialize with invalid sharemode returns %08x
\n
"
,
hr
);
ok
(
hr
==
AUDCLNT_E_NOT_INITIALIZED
,
"Initialize with invalid sharemode returns %08x
\n
"
,
hr
);
hr
=
IAudioClient_Initialize
(
ac
,
AUDCLNT_SHAREMODE_SHARED
,
0xffffffff
,
5000000
,
0
,
pwfx
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Initialize with invalid flags returns %08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Initialize with invalid flags returns %08x
\n
"
,
hr
);
/* It seems that if length > 2s or periodicity != 0 the length is ignored and call succeeds
* Since we can only initialize successfully once, skip those tests.
*/
hr
=
IAudioClient_Initialize
(
ac
,
AUDCLNT_SHAREMODE_SHARED
,
0
,
5000000
,
0
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"Initialize with null format returns %08x
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"Initialize with null format returns %08x
\n
"
,
hr
);
hr
=
IAudioClient_Initialize
(
ac
,
AUDCLNT_SHAREMODE_SHARED
,
0
,
5000000
,
0
,
pwfx
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Valid Initialize returns %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Valid Initialize returns %08x
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
{
...
...
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