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
6010ebb2
Commit
6010ebb2
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::GetInfo.
Signed-off-by:
Anton Baskanov
<
baskanov@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4a0db156
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
2 deletions
+50
-2
audiodata.c
dlls/amstream/audiodata.c
+25
-2
amstream.c
dlls/amstream/tests/amstream.c
+25
-0
No files found.
dlls/amstream/audiodata.c
View file @
6010ebb2
...
...
@@ -30,6 +30,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(amstream);
typedef
struct
{
IAudioData
IAudioData_iface
;
LONG
ref
;
DWORD
size
;
BYTE
*
data
;
DWORD
actual_data
;
}
AMAudioDataImpl
;
static
inline
AMAudioDataImpl
*
impl_from_IAudioData
(
IAudioData
*
iface
)
...
...
@@ -87,9 +90,29 @@ static HRESULT WINAPI IAudioDataImpl_SetBuffer(IAudioData* iface, DWORD size, BY
static
HRESULT
WINAPI
IAudioDataImpl_GetInfo
(
IAudioData
*
iface
,
DWORD
*
length
,
BYTE
**
data
,
DWORD
*
actual_data
)
{
FIXME
(
"(%p)->(%p,%p,%p): stub
\n
"
,
iface
,
length
,
data
,
actual_data
);
AMAudioDataImpl
*
This
=
impl_from_IAudioData
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p,%p,%p)
\n
"
,
iface
,
length
,
data
,
actual_data
);
if
(
!
This
->
data
)
{
return
MS_E_NOTINIT
;
}
if
(
length
)
{
*
length
=
This
->
size
;
}
if
(
data
)
{
*
data
=
This
->
data
;
}
if
(
actual_data
)
{
*
actual_data
=
This
->
actual_data
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
IAudioDataImpl_SetActual
(
IAudioData
*
iface
,
DWORD
data_valid
)
...
...
dlls/amstream/tests/amstream.c
View file @
6010ebb2
...
...
@@ -626,6 +626,30 @@ static void test_audiodata_query_interface(void)
IUnknown_Release
(
unknown
);
}
static
void
test_audiodata_get_info
(
void
)
{
IUnknown
*
unknown
=
create_audio_data
();
IAudioData
*
audio_data
=
NULL
;
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_GetInfo
(
audio_data
,
NULL
,
NULL
,
NULL
);
ok
(
MS_E_NOTINIT
==
result
,
"got 0x%08x
\n
"
,
result
);
IAudioData_Release
(
audio_data
);
out_unknown:
IUnknown_Release
(
unknown
);
}
START_TEST
(
amstream
)
{
HANDLE
file
;
...
...
@@ -645,6 +669,7 @@ START_TEST(amstream)
}
test_audiodata_query_interface
();
test_audiodata_get_info
();
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