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
3dd29128
Commit
3dd29128
authored
Feb 14, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Feb 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Create a port in the perf CreateStandardAudioPath().
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d966413a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
performance.c
dlls/dmime/performance.c
+10
-3
performance.c
dlls/dmime/tests/performance.c
+13
-0
No files found.
dlls/dmime/performance.c
View file @
3dd29128
...
...
@@ -1070,16 +1070,17 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateAudioPath(IDirectMusicP
}
static
HRESULT
WINAPI
IDirectMusicPerformance8Impl_CreateStandardAudioPath
(
IDirectMusicPerformance8
*
iface
,
DWORD
dwType
,
DWORD
dwPChannelC
ount
,
BOOL
fActivate
,
IDirectMusicAudioPath
**
ppNewPath
)
DWORD
dwType
,
DWORD
pchannel_c
ount
,
BOOL
fActivate
,
IDirectMusicAudioPath
**
ppNewPath
)
{
IDirectMusicPerformance8Impl
*
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)->(%d, %d, %d, %p): semi-stub
\n
"
,
This
,
dwType
,
dwPChannelC
ount
,
fActivate
,
ppNewPath
);
FIXME
(
"(%p)->(%d, %d, %d, %p): semi-stub
\n
"
,
This
,
dwType
,
pchannel_c
ount
,
fActivate
,
ppNewPath
);
if
(
NULL
==
ppNewPath
)
{
return
E_POINTER
;
...
...
@@ -1126,7 +1127,13 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath(IDire
return
E_INVALIDARG
;
}
/* FIXME: Should we create one secondary buffer for each PChannel? */
/* Create a port */
params
.
dwValidParams
=
DMUS_PORTPARAMS_CHANNELGROUPS
|
DMUS_PORTPARAMS_AUDIOCHANNELS
;
params
.
dwChannelGroups
=
(
pchannel_count
+
15
)
/
16
;
params
.
dwAudioChannels
=
format
.
nChannels
;
if
(
FAILED
(
hr
=
perf_dmport_create
(
This
,
&
params
)))
return
hr
;
hr
=
IDirectSound_CreateSoundBuffer
(
This
->
dsound
,
&
desc
,
&
buffer
,
NULL
);
if
(
FAILED
(
hr
))
return
DSERR_BUFFERLOST
;
...
...
dlls/dmime/tests/performance.c
View file @
3dd29128
...
...
@@ -82,6 +82,7 @@ static HRESULT test_InitAudio(void)
IDirectSound
*
dsound
;
IDirectMusicPort
*
port
;
IDirectMusicAudioPath
*
path
;
DWORD
channel
,
group
;
HRESULT
hr
;
ULONG
ref
;
...
...
@@ -216,6 +217,18 @@ static HRESULT test_InitAudio(void)
ok
(
ref
==
2
,
"dmusic ref count got %d expected 2
\n
"
,
ref
);
destroy_performance
(
performance
,
dmusic
,
dsound
);
/* InitAudio with perf channel count not a multiple of 16 rounds up */
create_performance
(
&
performance
,
NULL
,
NULL
,
TRUE
);
hr
=
IDirectMusicPerformance8_InitAudio
(
performance
,
NULL
,
NULL
,
NULL
,
DMUS_APATH_SHARED_STEREOPLUSREVERB
,
29
,
DMUS_AUDIOF_ALL
,
NULL
);
ok
(
hr
==
S_OK
,
"InitAudio failed: %08x
\n
"
,
hr
);
hr
=
IDirectMusicPerformance8_PChannelInfo
(
performance
,
31
,
&
port
,
&
group
,
&
channel
);
todo_wine
ok
(
hr
==
S_OK
&&
group
==
2
&&
channel
==
15
,
"PChannelInfo failed, got %08x, %u, %u
\n
"
,
hr
,
group
,
channel
);
hr
=
IDirectMusicPerformance8_PChannelInfo
(
performance
,
32
,
&
port
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"PChannelInfo failed, got %08x
\n
"
,
hr
);
destroy_performance
(
performance
,
NULL
,
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