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
495e3288
Commit
495e3288
authored
May 18, 2012
by
Christian Costa
Committed by
Alexandre Julliard
May 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmusic: Cleanup IDirectMusicCollection_GetInstrument.
parent
82f3b86c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
collection.c
dlls/dmusic/collection.c
+22
-22
No files found.
dlls/dmusic/collection.c
View file @
495e3288
...
...
@@ -103,30 +103,30 @@ static ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_Release(LP
}
/* IDirectMusicCollection Interface follows: */
static
HRESULT
WINAPI
IDirectMusicCollectionImpl_IDirectMusicCollection_GetInstrument
(
LPDIRECTMUSICCOLLECTION
iface
,
DWORD
dwPatch
,
IDirectMusicInstrument
**
ppI
nstrument
)
static
HRESULT
WINAPI
IDirectMusicCollectionImpl_IDirectMusicCollection_GetInstrument
(
LPDIRECTMUSICCOLLECTION
iface
,
DWORD
patch
,
IDirectMusicInstrument
**
i
nstrument
)
{
IDirectMusicCollectionImpl
*
This
=
impl_from_IDirectMusicCollection
(
iface
);
DMUS_PRIVATE_INSTRUMENTENTRY
*
tmpEntry
;
struct
list
*
listEntry
;
DWORD
dwInstPatch
;
IDirectMusicCollectionImpl
*
This
=
impl_from_IDirectMusicCollection
(
iface
);
DMUS_PRIVATE_INSTRUMENTENTRY
*
inst_entry
;
struct
list
*
list_entry
;
DWORD
inst_patch
;
TRACE
(
"(%p/%p)->(%u, %p)
\n
"
,
iface
,
This
,
patch
,
instrument
);
LIST_FOR_EACH
(
list_entry
,
&
This
->
Instruments
)
{
inst_entry
=
LIST_ENTRY
(
list_entry
,
DMUS_PRIVATE_INSTRUMENTENTRY
,
entry
);
IDirectMusicInstrument_GetPatch
(
inst_entry
->
pInstrument
,
&
inst_patch
);
if
(
patch
==
inst_patch
)
{
*
instrument
=
inst_entry
->
pInstrument
;
IDirectMusicInstrument_AddRef
(
inst_entry
->
pInstrument
);
IDirectMusicInstrumentImpl_Custom_Load
(
inst_entry
->
pInstrument
,
This
->
pStm
);
TRACE
(
": returning instrument %p
\n
"
,
*
instrument
);
return
S_OK
;
}
}
TRACE
(
"(%p, %d, %p)
\n
"
,
This
,
dwPatch
,
ppInstrument
);
LIST_FOR_EACH
(
listEntry
,
&
This
->
Instruments
)
{
tmpEntry
=
LIST_ENTRY
(
listEntry
,
DMUS_PRIVATE_INSTRUMENTENTRY
,
entry
);
IDirectMusicInstrument_GetPatch
(
tmpEntry
->
pInstrument
,
&
dwInstPatch
);
if
(
dwPatch
==
dwInstPatch
)
{
*
ppInstrument
=
tmpEntry
->
pInstrument
;
IDirectMusicInstrument_AddRef
(
tmpEntry
->
pInstrument
);
IDirectMusicInstrumentImpl_Custom_Load
(
tmpEntry
->
pInstrument
,
This
->
pStm
);
/* load instrument before returning it */
TRACE
(
": returning instrument %p
\n
"
,
*
ppInstrument
);
return
S_OK
;
}
}
TRACE
(
": instrument not found
\n
"
);
return
DMUS_E_INVALIDPATCH
;
TRACE
(
": instrument not found
\n
"
);
return
DMUS_E_INVALIDPATCH
;
}
static
HRESULT
WINAPI
IDirectMusicCollectionImpl_IDirectMusicCollection_EnumInstrument
(
LPDIRECTMUSICCOLLECTION
iface
,
DWORD
dwIndex
,
DWORD
*
pdwPatch
,
LPWSTR
pwszName
,
DWORD
dwNameLen
)
...
...
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