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
e4328834
Commit
e4328834
authored
Jul 31, 2022
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Aug 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xactengine3_7: Return error on invalid notification value.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
parent
d1c08b17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
xact3.c
dlls/xactengine3_7/tests/xact3.c
+18
-0
xact_dll.c
dlls/xactengine3_7/xact_dll.c
+8
-0
No files found.
dlls/xactengine3_7/tests/xact3.c
View file @
e4328834
...
...
@@ -208,6 +208,24 @@ static void test_notifications(void)
hr
=
IXACT3Engine_Initialize
(
engine
,
&
params
);
ok
(
hr
==
S_OK
,
"Cannot initialize engine, hr %#lx
\n
"
,
hr
);
notification_desc
.
type
=
0
;
notification_desc
.
flags
=
0
;
notification_desc
.
pvContext
=
&
prepared_data
;
hr
=
IXACT3Engine_RegisterNotification
(
engine
,
&
notification_desc
);
ok
(
hr
==
E_INVALIDARG
,
"got hr %#lx
\n
"
,
hr
);
hr
=
IXACT3Engine_UnRegisterNotification
(
engine
,
&
notification_desc
);
ok
(
hr
==
S_OK
,
"got hr %#lx
\n
"
,
hr
);
notification_desc
.
type
=
XACTNOTIFICATIONTYPE_WAVEBANKSTREAMING_INVALIDCONTENT
+
1
;
notification_desc
.
flags
=
0
;
notification_desc
.
pvContext
=
&
prepared_data
;
hr
=
IXACT3Engine_RegisterNotification
(
engine
,
&
notification_desc
);
ok
(
hr
==
E_INVALIDARG
,
"got hr %#lx
\n
"
,
hr
);
hr
=
IXACT3Engine_UnRegisterNotification
(
engine
,
&
notification_desc
);
ok
(
hr
==
S_OK
,
"got hr %#lx
\n
"
,
hr
);
prepared_data
.
type
=
XACTNOTIFICATIONTYPE_WAVEBANKPREPARED
;
prepared_data
.
thread_id
=
GetCurrentThreadId
();
notification_desc
.
type
=
XACTNOTIFICATIONTYPE_WAVEBANKPREPARED
;
...
...
dlls/xactengine3_7/xact_dll.c
View file @
e4328834
...
...
@@ -1517,6 +1517,10 @@ static HRESULT WINAPI IXACT3EngineImpl_RegisterNotification(IXACT3Engine *iface,
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pNotificationDesc
);
if
(
pNotificationDesc
->
type
<
XACTNOTIFICATIONTYPE_CUEPREPARED
||
pNotificationDesc
->
type
>
XACTNOTIFICATIONTYPE_WAVEBANKSTREAMING_INVALIDCONTENT
)
return
E_INVALIDARG
;
unwrap_notificationdesc
(
&
fdesc
,
pNotificationDesc
);
This
->
contexts
[
pNotificationDesc
->
type
]
=
pNotificationDesc
->
pvContext
;
fdesc
.
pvContext
=
This
;
...
...
@@ -1531,6 +1535,10 @@ static HRESULT WINAPI IXACT3EngineImpl_UnRegisterNotification(IXACT3Engine *ifac
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pNotificationDesc
);
if
(
pNotificationDesc
->
type
<
XACTNOTIFICATIONTYPE_CUEPREPARED
||
pNotificationDesc
->
type
>
XACTNOTIFICATIONTYPE_WAVEBANKSTREAMING_INVALIDCONTENT
)
return
S_OK
;
unwrap_notificationdesc
(
&
fdesc
,
pNotificationDesc
);
fdesc
.
pvContext
=
This
;
return
FACTAudioEngine_UnRegisterNotification
(
This
->
fact_engine
,
&
fdesc
);
...
...
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