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
634deaf8
Commit
634deaf8
authored
Jul 28, 2016
by
Anton Baskanov
Committed by
Alexandre Julliard
Aug 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream: Implement AMAudioData::SetActual.
Signed-off-by:
Anton Baskanov
<
baskanov@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d4db4bfd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
2 deletions
+60
-2
audiodata.c
dlls/amstream/audiodata.c
+11
-2
amstream.c
dlls/amstream/tests/amstream.c
+49
-0
No files found.
dlls/amstream/audiodata.c
View file @
634deaf8
...
@@ -151,9 +151,18 @@ static HRESULT WINAPI IAudioDataImpl_GetInfo(IAudioData* iface, DWORD *length, B
...
@@ -151,9 +151,18 @@ static HRESULT WINAPI IAudioDataImpl_GetInfo(IAudioData* iface, DWORD *length, B
static
HRESULT
WINAPI
IAudioDataImpl_SetActual
(
IAudioData
*
iface
,
DWORD
data_valid
)
static
HRESULT
WINAPI
IAudioDataImpl_SetActual
(
IAudioData
*
iface
,
DWORD
data_valid
)
{
{
FIXME
(
"(%p)->(%u): stub
\n
"
,
iface
,
data_valid
);
AMAudioDataImpl
*
This
=
impl_from_IAudioData
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%u)
\n
"
,
iface
,
data_valid
);
if
(
data_valid
>
This
->
size
)
{
return
E_INVALIDARG
;
}
This
->
actual_data
=
data_valid
;
return
S_OK
;
}
}
/*** IAudioData methods ***/
/*** IAudioData methods ***/
...
...
dlls/amstream/tests/amstream.c
View file @
634deaf8
...
@@ -697,6 +697,54 @@ out_unknown:
...
@@ -697,6 +697,54 @@ out_unknown:
IUnknown_Release
(
unknown
);
IUnknown_Release
(
unknown
);
}
}
static
void
test_audiodata_set_actual
(
void
)
{
IUnknown
*
unknown
=
create_audio_data
();
IAudioData
*
audio_data
=
NULL
;
BYTE
buffer
[
100
]
=
{
0
};
DWORD
actual_data
=
0
;
HRESULT
result
;
result
=
IUnknown_QueryInterface
(
unknown
,
&
IID_IAudioData
,
(
void
**
)
&
audio_data
);
if
(
FAILED
(
result
))
{
/* test_audiodata_query_interface handles this case */
skip
(
"No IAudioData
\n
"
);
goto
out_unknown
;
}
result
=
IAudioData_SetActual
(
audio_data
,
0
);
ok
(
S_OK
==
result
,
"got 0x%08x
\n
"
,
result
);
result
=
IAudioData_SetBuffer
(
audio_data
,
sizeof
(
buffer
),
buffer
,
0
);
ok
(
S_OK
==
result
,
"got 0x%08x
\n
"
,
result
);
result
=
IAudioData_SetActual
(
audio_data
,
sizeof
(
buffer
)
+
1
);
ok
(
E_INVALIDARG
==
result
,
"got 0x%08x
\n
"
,
result
);
result
=
IAudioData_SetActual
(
audio_data
,
sizeof
(
buffer
));
ok
(
S_OK
==
result
,
"got 0x%08x
\n
"
,
result
);
actual_data
=
0xdeadbeef
;
result
=
IAudioData_GetInfo
(
audio_data
,
NULL
,
NULL
,
&
actual_data
);
ok
(
S_OK
==
result
,
"got 0x%08x
\n
"
,
result
);
ok
(
sizeof
(
buffer
)
==
actual_data
,
"got %u
\n
"
,
actual_data
);
result
=
IAudioData_SetActual
(
audio_data
,
0
);
ok
(
S_OK
==
result
,
"got 0x%08x
\n
"
,
result
);
actual_data
=
0xdeadbeef
;
result
=
IAudioData_GetInfo
(
audio_data
,
NULL
,
NULL
,
&
actual_data
);
ok
(
S_OK
==
result
,
"got 0x%08x
\n
"
,
result
);
ok
(
0
==
actual_data
,
"got %u
\n
"
,
actual_data
);
IAudioData_Release
(
audio_data
);
out_unknown:
IUnknown_Release
(
unknown
);
}
START_TEST
(
amstream
)
START_TEST
(
amstream
)
{
{
HANDLE
file
;
HANDLE
file
;
...
@@ -718,6 +766,7 @@ START_TEST(amstream)
...
@@ -718,6 +766,7 @@ START_TEST(amstream)
test_audiodata_query_interface
();
test_audiodata_query_interface
();
test_audiodata_get_info
();
test_audiodata_get_info
();
test_audiodata_set_buffer
();
test_audiodata_set_buffer
();
test_audiodata_set_actual
();
CoUninitialize
();
CoUninitialize
();
}
}
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