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
b3d1b1f2
Commit
b3d1b1f2
authored
Apr 27, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Don't expose IDirectMusicAudioPath impl details.
parent
7567db85
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
46 deletions
+56
-46
audiopath.c
dlls/dmime/audiopath.c
+38
-0
dmime_private.h
dlls/dmime/dmime_private.h
+3
-22
performance.c
dlls/dmime/performance.c
+15
-24
No files found.
dlls/dmime/audiopath.c
View file @
b3d1b1f2
...
...
@@ -22,6 +22,43 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dmime
);
WINE_DECLARE_DEBUG_CHANNEL
(
dmfile
);
struct
IDirectMusicAudioPathImpl
{
/* IUnknown fields */
const
IUnknownVtbl
*
UnknownVtbl
;
const
IDirectMusicAudioPathVtbl
*
AudioPathVtbl
;
const
IDirectMusicObjectVtbl
*
ObjectVtbl
;
const
IPersistStreamVtbl
*
PersistStreamVtbl
;
LONG
ref
;
/* IDirectMusicAudioPathImpl fields */
LPDMUS_OBJECTDESC
pDesc
;
IDirectMusicPerformance8
*
pPerf
;
IDirectMusicGraph
*
pToolGraph
;
IDirectSoundBuffer
*
pDSBuffer
;
IDirectSoundBuffer
*
pPrimary
;
BOOL
fActive
;
};
void
set_audiopath_perf_pointer
(
IDirectMusicAudioPath
*
iface
,
IDirectMusicPerformance8
*
performance
)
{
ICOM_THIS_MULTI
(
IDirectMusicAudioPathImpl
,
AudioPathVtbl
,
iface
);
This
->
pPerf
=
performance
;
}
void
set_audiopath_dsound_buffer
(
IDirectMusicAudioPath
*
iface
,
IDirectSoundBuffer
*
buffer
)
{
ICOM_THIS_MULTI
(
IDirectMusicAudioPathImpl
,
AudioPathVtbl
,
iface
);
This
->
pDSBuffer
=
buffer
;
}
void
set_audiopath_primary_dsound_buffer
(
IDirectMusicAudioPath
*
iface
,
IDirectSoundBuffer
*
buffer
)
{
ICOM_THIS_MULTI
(
IDirectMusicAudioPathImpl
,
AudioPathVtbl
,
iface
);
This
->
pPrimary
=
buffer
;
}
/*****************************************************************************
* IDirectMusicAudioPathImpl implementation
*/
...
...
@@ -72,6 +109,7 @@ static ULONG WINAPI IDirectMusicAudioPathImpl_IUnknown_Release (LPUNKNOWN iface)
if
(
This
->
pDSBuffer
)
{
IDirectSoundBuffer8_Release
(
This
->
pDSBuffer
);
}
This
->
pPerf
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
dlls/dmime/dmime_private.h
View file @
b3d1b1f2
...
...
@@ -78,6 +78,9 @@ extern HRESULT WINAPI create_dmtempotrack(REFIID riid, void **ret_iface) DECLSPE
extern
HRESULT
WINAPI
create_dmtimesigtrack
(
REFIID
riid
,
void
**
ret_iface
)
DECLSPEC_HIDDEN
;
extern
HRESULT
WINAPI
create_dmwavetrack
(
REFIID
riid
,
void
**
ret_iface
)
DECLSPEC_HIDDEN
;
extern
void
set_audiopath_perf_pointer
(
IDirectMusicAudioPath
*
,
IDirectMusicPerformance8
*
)
DECLSPEC_HIDDEN
;
extern
void
set_audiopath_dsound_buffer
(
IDirectMusicAudioPath
*
,
IDirectSoundBuffer
*
)
DECLSPEC_HIDDEN
;
extern
void
set_audiopath_primary_dsound_buffer
(
IDirectMusicAudioPath
*
,
IDirectSoundBuffer
*
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
* Auxiliary definitions
...
...
@@ -121,28 +124,6 @@ typedef struct DMUSIC_PRIVATE_PCHANNEL_ {
}
DMUSIC_PRIVATE_PCHANNEL
,
*
LPDMUSIC_PRIVATE_PCHANNEL
;
/*****************************************************************************
* IDirectMusicAudioPathImpl implementation structure
*/
struct
IDirectMusicAudioPathImpl
{
/* IUnknown fields */
const
IUnknownVtbl
*
UnknownVtbl
;
const
IDirectMusicAudioPathVtbl
*
AudioPathVtbl
;
const
IDirectMusicObjectVtbl
*
ObjectVtbl
;
const
IPersistStreamVtbl
*
PersistStreamVtbl
;
LONG
ref
;
/* IDirectMusicAudioPathImpl fields */
LPDMUS_OBJECTDESC
pDesc
;
IDirectMusicPerformance8
*
pPerf
;
IDirectMusicGraph
*
pToolGraph
;
IDirectSoundBuffer
*
pDSBuffer
;
IDirectSoundBuffer
*
pPrimary
;
BOOL
fActive
;
};
/*****************************************************************************
* IDirectMusicLyricsTrack implementation structure
*/
struct
IDirectMusicLyricsTrack
...
...
dlls/dmime/performance.c
View file @
b3d1b1f2
...
...
@@ -987,7 +987,6 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateAudioPath(IDirectMusicP
IUnknown
*
pSourceConfig
,
BOOL
fActivate
,
IDirectMusicAudioPath
**
ppNewPath
)
{
IDirectMusicPerformance8Impl
*
This
=
impl_from_IDirectMusicPerformance8
(
iface
);
IDirectMusicAudioPathImpl
*
default_path
;
IDirectMusicAudioPath
*
pPath
;
FIXME
(
"(%p, %p, %d, %p): stub
\n
"
,
This
,
pSourceConfig
,
fActivate
,
ppNewPath
);
...
...
@@ -997,8 +996,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateAudioPath(IDirectMusicP
}
create_dmaudiopath
(
&
IID_IDirectMusicAudioPath
,
(
void
**
)
&
pPath
);
default_path
=
(
IDirectMusicAudioPathImpl
*
)((
char
*
)(
pPath
)
-
offsetof
(
IDirectMusicAudioPathImpl
,
AudioPathVtbl
));
default_path
->
pPerf
=
&
This
->
IDirectMusicPerformance8_iface
;
set_audiopath_perf_pointer
(
pPath
,
iface
);
/** TODO */
...
...
@@ -1011,11 +1009,10 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath(IDire
DWORD
dwType
,
DWORD
dwPChannelCount
,
BOOL
fActivate
,
IDirectMusicAudioPath
**
ppNewPath
)
{
IDirectMusicPerformance8Impl
*
This
=
impl_from_IDirectMusicPerformance8
(
iface
);
IDirectMusicAudioPathImpl
*
default_path
;
IDirectMusicAudioPath
*
pPath
;
DSBUFFERDESC
desc
;
WAVEFORMATEX
format
;
LPDIRECTSOUNDBUFFER
buffer
;
IDirectSoundBuffer
*
buffer
,
*
primary_
buffer
;
HRESULT
hr
=
S_OK
;
FIXME
(
"(%p)->(%d, %d, %d, %p): semi-stub
\n
"
,
This
,
dwType
,
dwPChannelCount
,
fActivate
,
ppNewPath
);
...
...
@@ -1024,9 +1021,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath(IDire
return
E_POINTER
;
}
create_dmaudiopath
(
&
IID_IDirectMusicAudioPath
,
(
void
**
)
&
pPath
);
default_path
=
(
IDirectMusicAudioPathImpl
*
)((
char
*
)(
pPath
)
-
offsetof
(
IDirectMusicAudioPathImpl
,
AudioPathVtbl
));
default_path
->
pPerf
=
&
This
->
IDirectMusicPerformance8_iface
;
*
ppNewPath
=
NULL
;
/* Secondary buffer description */
memset
(
&
format
,
0
,
sizeof
(
format
));
...
...
@@ -1064,33 +1059,29 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath(IDire
format
.
nAvgBytesPerSec
*=
2
;
break
;
default:
HeapFree
(
GetProcessHeap
(),
0
,
default_path
);
*
ppNewPath
=
NULL
;
return
E_INVALIDARG
;
}
/* FIXME: Should we create one secondary buffer for each PChannel? */
hr
=
IDirectSound8_CreateSoundBuffer
((
LPDIRECTSOUND8
)
This
->
pDirectSound
,
&
desc
,
&
buffer
,
NULL
);
if
(
FAILED
(
hr
))
{
HeapFree
(
GetProcessHeap
(),
0
,
default_path
);
*
ppNewPath
=
NULL
;
if
(
FAILED
(
hr
))
return
DSERR_BUFFERLOST
;
}
default_path
->
pDSBuffer
=
buffer
;
/* Update description for creating primary buffer */
desc
.
dwFlags
|=
DSBCAPS_PRIMARYBUFFER
;
desc
.
dwBufferBytes
=
0
;
desc
.
lpwfxFormat
=
NULL
;
hr
=
IDirectSound8_CreateSoundBuffer
((
LPDIRECTSOUND8
)
This
->
pDirectSound
,
&
desc
,
&
buffer
,
NULL
);
hr
=
IDirectSound8_CreateSoundBuffer
((
LPDIRECTSOUND8
)
This
->
pDirectSound
,
&
desc
,
&
primary_
buffer
,
NULL
);
if
(
FAILED
(
hr
))
{
IDirectSoundBuffer_Release
(
default_path
->
pDSBuffer
);
HeapFree
(
GetProcessHeap
(),
0
,
default_path
);
*
ppNewPath
=
NULL
;
IDirectSoundBuffer_Release
(
buffer
);
return
DSERR_BUFFERLOST
;
}
default_path
->
pPrimary
=
buffer
;
create_dmaudiopath
(
&
IID_IDirectMusicAudioPath
,
(
void
**
)
&
pPath
);
set_audiopath_perf_pointer
(
pPath
,
iface
);
set_audiopath_dsound_buffer
(
pPath
,
buffer
);
set_audiopath_primary_dsound_buffer
(
pPath
,
buffer
);
*
ppNewPath
=
pPath
;
...
...
@@ -1105,15 +1096,15 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_SetDefaultAudioPath(IDirectMu
IDirectMusicPerformance8Impl
*
This
=
impl_from_IDirectMusicPerformance8
(
iface
);
FIXME
(
"(%p, %p): semi-stub
\n
"
,
This
,
pAudioPath
);
if
(
NULL
!=
This
->
pDefaultPath
)
{
if
(
This
->
pDefaultPath
)
{
IDirectMusicAudioPath_Release
(
This
->
pDefaultPath
);
((
IDirectMusicAudioPathImpl
*
)
This
->
pDefaultPath
)
->
pPerf
=
NULL
;
This
->
pDefaultPath
=
NULL
;
}
This
->
pDefaultPath
=
pAudioPath
;
if
(
NULL
!=
This
->
pDefaultPath
)
{
if
(
This
->
pDefaultPath
)
{
IDirectMusicAudioPath_AddRef
(
This
->
pDefaultPath
);
((
IDirectMusicAudioPathImpl
*
)
This
->
pDefaultPath
)
->
pPerf
=
&
This
->
IDirectMusicPerformance8_iface
;
set_audiopath_perf_pointer
(
This
->
pDefaultPath
,
iface
)
;
}
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