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
9e0487c4
Commit
9e0487c4
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_AUDIOPATH_INACTIVE when audio paths are not enabled.
parent
0fb4e5ec
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
37 deletions
+29
-37
performance.c
dlls/dmime/performance.c
+29
-37
No files found.
dlls/dmime/performance.c
View file @
9e0487c4
...
...
@@ -1096,29 +1096,26 @@ static HRESULT WINAPI performance_ClonePMsg(IDirectMusicPerformance8 *iface, DMU
}
static
HRESULT
WINAPI
performance_CreateAudioPath
(
IDirectMusicPerformance8
*
iface
,
IUnknown
*
pSourceConfig
,
BOOL
fActivate
,
IDirectMusicAudioPath
**
ppNewPath
)
IUnknown
*
pSourceConfig
,
BOOL
fActivate
,
IDirectMusicAudioPath
**
ret_iface
)
{
struct
performance
*
This
=
impl_from_IDirectMusicPerformance8
(
iface
);
IDirectMusicAudioPath
*
pPath
;
FIXME
(
"(%p, %p, %d, %p): stub
\n
"
,
This
,
pSourceConfig
,
fActivate
,
ppNewPath
);
FIXME
(
"(%p, %p, %d, %p): stub
\n
"
,
This
,
pSourceConfig
,
fActivate
,
ret_iface
);
if
(
NULL
==
ppNewPath
)
{
return
E_POINTER
;
}
if
(
!
ret_iface
)
return
E_POINTER
;
if
(
!
This
->
audio_paths_enabled
)
return
DMUS_E_AUDIOPATH_INACTIVE
;
create_dmaudiopath
(
&
IID_IDirectMusicAudioPath
,
(
void
**
)
&
pPath
);
create_dmaudiopath
(
&
IID_IDirectMusicAudioPath
,
(
void
**
)
&
pPath
);
set_audiopath_perf_pointer
(
pPath
,
iface
);
/** TODO */
*
ppNewPath
=
pPath
;
return
IDirectMusicAudioPath_Activate
(
*
ppNewPath
,
fActivate
);
*
ret_iface
=
pPath
;
return
IDirectMusicAudioPath_Activate
(
*
ret_iface
,
fActivate
);
}
static
HRESULT
WINAPI
performance_CreateStandardAudioPath
(
IDirectMusicPerformance8
*
iface
,
DWORD
dwType
,
DWORD
pchannel_count
,
BOOL
fActivate
,
IDirectMusicAudioPath
**
ppNewPath
)
DWORD
dwType
,
DWORD
pchannel_count
,
BOOL
fActivate
,
IDirectMusicAudioPath
**
ret_iface
)
{
struct
performance
*
This
=
impl_from_IDirectMusicPerformance8
(
iface
);
IDirectMusicAudioPath
*
pPath
;
...
...
@@ -1128,13 +1125,12 @@ static HRESULT WINAPI performance_CreateStandardAudioPath(IDirectMusicPerformanc
IDirectSoundBuffer
*
buffer
,
*
primary_buffer
;
HRESULT
hr
=
S_OK
;
FIXME
(
"(%p)->(%ld, %ld, %d, %p): semi-stub
\n
"
,
This
,
dwType
,
pchannel_count
,
fActivate
,
ppNewPath
);
FIXME
(
"(%p)->(%ld, %ld, %d, %p): semi-stub
\n
"
,
This
,
dwType
,
pchannel_count
,
fActivate
,
ret_iface
);
if
(
NULL
==
ppNewPath
)
{
return
E_POINTER
;
}
if
(
!
ret_iface
)
return
E_POINTER
;
if
(
!
This
->
audio_paths_enabled
)
return
DMUS_E_AUDIOPATH_INACTIVE
;
*
ppNewPath
=
NULL
;
*
ret_iface
=
NULL
;
/* Secondary buffer description */
memset
(
&
format
,
0
,
sizeof
(
format
));
...
...
@@ -1204,25 +1200,22 @@ static HRESULT WINAPI performance_CreateStandardAudioPath(IDirectMusicPerformanc
set_audiopath_dsound_buffer
(
pPath
,
buffer
);
set_audiopath_primary_dsound_buffer
(
pPath
,
primary_buffer
);
*
ppNewPath
=
pPath
;
TRACE
(
" returning IDirectMusicAudioPath interface at %p.
\n
"
,
*
ppNewPath
);
return
IDirectMusicAudioPath_Activate
(
*
ppNewPath
,
fActivate
);
*
ret_iface
=
pPath
;
TRACE
(
" returning IDirectMusicAudioPath interface at %p.
\n
"
,
*
ret_iface
);
return
IDirectMusicAudioPath_Activate
(
*
ret_iface
,
fActivate
);
}
static
HRESULT
WINAPI
performance_SetDefaultAudioPath
(
IDirectMusicPerformance8
*
iface
,
IDirectMusicAudioPath
*
pAudioP
ath
)
static
HRESULT
WINAPI
performance_SetDefaultAudioPath
(
IDirectMusicPerformance8
*
iface
,
IDirectMusicAudioPath
*
audio_p
ath
)
{
struct
performance
*
This
=
impl_from_IDirectMusicPerformance8
(
iface
);
FIXME
(
"(%p, %p): semi-stub
\n
"
,
This
,
pAudioP
ath
);
FIXME
(
"(%p, %p): semi-stub
\n
"
,
This
,
audio_p
ath
);
if
(
This
->
pDefaultPath
)
{
IDirectMusicAudioPath_Release
(
This
->
pDefaultPath
);
This
->
pDefaultPath
=
NULL
;
}
This
->
pDefaultPath
=
pAudioPath
;
if
(
This
->
pDefaultPath
)
{
if
(
!
This
->
audio_paths_enabled
)
return
DMUS_E_AUDIOPATH_INACTIVE
;
if
(
This
->
pDefaultPath
)
IDirectMusicAudioPath_Release
(
This
->
pDefaultPath
);
if
((
This
->
pDefaultPath
=
audio_path
))
{
IDirectMusicAudioPath_AddRef
(
This
->
pDefaultPath
);
set_audiopath_perf_pointer
(
This
->
pDefaultPath
,
iface
);
}
...
...
@@ -1231,18 +1224,17 @@ static HRESULT WINAPI performance_SetDefaultAudioPath(IDirectMusicPerformance8 *
}
static
HRESULT
WINAPI
performance_GetDefaultAudioPath
(
IDirectMusicPerformance8
*
iface
,
IDirectMusicAudioPath
**
ppAudioPath
)
IDirectMusicAudioPath
**
ret_iface
)
{
struct
performance
*
This
=
impl_from_IDirectMusicPerformance8
(
iface
);
FIXME
(
"(%p, %p): semi-stub (%p)
\n
"
,
This
,
ppAudioPath
,
This
->
pDefaultPath
);
FIXME
(
"(%p, %p): semi-stub (%p)
\n
"
,
This
,
ret_iface
,
This
->
pDefaultPath
);
if
(
!
ret_iface
)
return
E_POINTER
;
if
(
!
This
->
audio_paths_enabled
)
return
DMUS_E_AUDIOPATH_INACTIVE
;
if
((
*
ret_iface
=
This
->
pDefaultPath
))
IDirectMusicAudioPath_AddRef
(
*
ret_iface
);
if
(
NULL
!=
This
->
pDefaultPath
)
{
*
ppAudioPath
=
This
->
pDefaultPath
;
IDirectMusicAudioPath_AddRef
(
*
ppAudioPath
);
}
else
{
*
ppAudioPath
=
NULL
;
}
return
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