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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
55 deletions
+47
-55
performance.c
dlls/dmime/performance.c
+47
-55
No files found.
dlls/dmime/performance.c
View file @
9e0487c4
...
...
@@ -1096,45 +1096,41 @@ 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
;
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
);
set_audiopath_perf_pointer
(
pPath
,
iface
);
create_dmaudiopath
(
&
IID_IDirectMusicAudioPath
,
(
void
**
)
&
pPath
);
set_audiopath_perf_pointer
(
pPath
,
iface
);
/** TODO */
*
ppNewPath
=
pPath
;
return
IDirectMusicAudioPath_Activate
(
*
ppNewPath
,
fActivate
);
/** TODO */
*
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
;
DSBUFFERDESC
desc
;
WAVEFORMATEX
format
;
DMUS_PORTPARAMS
params
=
{
0
};
IDirectSoundBuffer
*
buffer
,
*
primary_buffer
;
HRESULT
hr
=
S_OK
;
struct
performance
*
This
=
impl_from_IDirectMusicPerformance8
(
iface
);
IDirectMusicAudioPath
*
pPath
;
DSBUFFERDESC
desc
;
WAVEFORMATEX
format
;
DMUS_PORTPARAMS
params
=
{
0
};
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,46 +1200,42 @@ 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
);
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
)
{
IDirectMusicAudioPath_AddRef
(
This
->
pDefaultPath
);
set_audiopath_perf_pointer
(
This
->
pDefaultPath
,
iface
);
}
if
(
!
This
->
audio_paths_enabled
)
return
DMUS_E_AUDIOPATH_INACTIVE
;
return
S_OK
;
if
(
This
->
pDefaultPath
)
IDirectMusicAudioPath_Release
(
This
->
pDefaultPath
);
if
((
This
->
pDefaultPath
=
audio_path
))
{
IDirectMusicAudioPath_AddRef
(
This
->
pDefaultPath
);
set_audiopath_perf_pointer
(
This
->
pDefaultPath
,
iface
);
}
return
S_OK
;
}
static
HRESULT
WINAPI
performance_GetDefaultAudioPath
(
IDirectMusicPerformance8
*
iface
,
IDirectMusicAudioPath
**
ppAudioPath
)
IDirectMusicAudioPath
**
ret_iface
)
{
struct
performance
*
This
=
impl_from_IDirectMusicPerformance8
(
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
(
NULL
!=
This
->
pDefaultPath
)
{
*
ppAudioPath
=
This
->
pDefaultPath
;
IDirectMusicAudioPath_AddRef
(
*
ppAudioPath
);
}
else
{
*
ppAudioPath
=
NULL
;
}
return
S_OK
;
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
);
return
S_OK
;
}
static
HRESULT
WINAPI
performance_GetParamEx
(
IDirectMusicPerformance8
*
iface
,
REFGUID
rguidType
,
DWORD
dwTrackID
,
...
...
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