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
0fb4e5ec
Commit
0fb4e5ec
authored
Sep 25, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Return DMUS_E_AUDIOPATHS_IN_USE when audio paths are in use.
parent
9788fb69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
14 deletions
+18
-14
performance.c
dlls/dmime/performance.c
+16
-12
dmime.c
dlls/dmime/tests/dmime.c
+2
-2
No files found.
dlls/dmime/performance.c
View file @
0fb4e5ec
...
...
@@ -50,6 +50,7 @@ struct performance
/* performance channels */
struct
wine_rb_tree
pchannels
;
BOOL
audio_paths_enabled
;
IDirectMusicAudioPath
*
pDefaultPath
;
HANDLE
hNotification
;
REFERENCE_TIME
rtMinimum
;
...
...
@@ -730,8 +731,8 @@ static HRESULT WINAPI performance_AddPort(IDirectMusicPerformance8 *iface, IDire
FIXME
(
"(%p, %p): semi-stub
\n
"
,
This
,
port
);
if
(
!
This
->
dmusic
)
return
DMUS_E_NOT_INIT
;
if
(
!
This
->
dmusic
)
return
DMUS_E_NOT_INIT
;
if
(
This
->
audio_paths_enabled
)
return
DMUS_E_AUDIOPATHS_IN_USE
;
if
(
!
port
)
{
DMUS_PORTPARAMS
params
=
{
...
...
@@ -753,11 +754,13 @@ static HRESULT WINAPI performance_AddPort(IDirectMusicPerformance8 *iface, IDire
static
HRESULT
WINAPI
performance_RemovePort
(
IDirectMusicPerformance8
*
iface
,
IDirectMusicPort
*
pPort
)
{
struct
performance
*
This
=
impl_from_IDirectMusicPerformance8
(
iface
);
struct
performance
*
This
=
impl_from_IDirectMusicPerformance8
(
iface
);
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
pPort
);
IDirectMusicPort_Release
(
pPort
);
return
S_OK
;
if
(
This
->
audio_paths_enabled
)
return
DMUS_E_AUDIOPATHS_IN_USE
;
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
pPort
);
IDirectMusicPort_Release
(
pPort
);
return
S_OK
;
}
static
HRESULT
WINAPI
performance_AssignPChannelBlock
(
IDirectMusicPerformance8
*
iface
,
...
...
@@ -767,10 +770,9 @@ static HRESULT WINAPI performance_AssignPChannelBlock(IDirectMusicPerformance8 *
FIXME
(
"(%p, %ld, %p, %ld): semi-stub
\n
"
,
This
,
block_num
,
port
,
group
);
if
(
!
port
)
return
E_POINTER
;
if
(
block_num
>
MAXDWORD
/
16
)
return
E_INVALIDARG
;
if
(
!
port
)
return
E_POINTER
;
if
(
block_num
>
MAXDWORD
/
16
)
return
E_INVALIDARG
;
if
(
This
->
audio_paths_enabled
)
return
DMUS_E_AUDIOPATHS_IN_USE
;
pchannel_block_set
(
&
This
->
pchannels
,
block_num
,
port
,
group
,
FALSE
);
...
...
@@ -785,8 +787,8 @@ static HRESULT WINAPI performance_AssignPChannel(IDirectMusicPerformance8 *iface
FIXME
(
"(%p)->(%ld, %p, %ld, %ld) semi-stub
\n
"
,
This
,
pchannel
,
port
,
group
,
channel
);
if
(
!
port
)
return
E_POINTER
;
if
(
!
port
)
return
E_POINTER
;
if
(
This
->
audio_paths_enabled
)
return
DMUS_E_AUDIOPATHS_IN_USE
;
block
=
pchannel_block_set
(
&
This
->
pchannels
,
pchannel
/
16
,
port
,
0
,
TRUE
);
if
(
block
)
{
...
...
@@ -959,6 +961,7 @@ static HRESULT WINAPI performance_CloseDown(IDirectMusicPerformance8 *iface)
IDirectMusic8_Release
(
This
->
dmusic
);
This
->
dmusic
=
NULL
;
}
This
->
audio_paths_enabled
=
FALSE
;
return
S_OK
;
}
...
...
@@ -1027,6 +1030,7 @@ static HRESULT WINAPI performance_InitAudio(IDirectMusicPerformance8 *iface, IDi
dsound
?
*
dsound
:
NULL
,
hwnd
)))
return
hr
;
This
->
audio_paths_enabled
=
TRUE
;
if
(
default_path_type
)
{
hr
=
IDirectMusicPerformance8_CreateStandardAudioPath
(
iface
,
default_path_type
,
...
...
dlls/dmime/tests/dmime.c
View file @
0fb4e5ec
...
...
@@ -1937,9 +1937,9 @@ static void test_performance_InitAudio(void)
ok
(
hr
==
S_OK
,
"PChannelInfo failed, got %#lx
\n
"
,
hr
);
ok
(
port
!=
NULL
,
"IDirectMusicPort not set
\n
"
);
hr
=
IDirectMusicPerformance8_AssignPChannel
(
performance
,
0
,
port
,
0
,
0
);
todo_wine
ok
(
hr
==
DMUS_E_AUDIOPATHS_IN_USE
,
"AssignPChannel failed (%#lx)
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_AUDIOPATHS_IN_USE
,
"AssignPChannel failed (%#lx)
\n
"
,
hr
);
hr
=
IDirectMusicPerformance8_AssignPChannelBlock
(
performance
,
0
,
port
,
0
);
todo_wine
ok
(
hr
==
DMUS_E_AUDIOPATHS_IN_USE
,
"AssignPChannelBlock failed (%#lx)
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_AUDIOPATHS_IN_USE
,
"AssignPChannelBlock failed (%#lx)
\n
"
,
hr
);
IDirectMusicPort_Release
(
port
);
hr
=
IDirectMusicPerformance8_GetDefaultAudioPath
(
performance
,
&
path
);
...
...
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