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
41b9ae33
Commit
41b9ae33
authored
May 27, 2004
by
Raphael Junqueira
Committed by
Alexandre Julliard
May 27, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support loading of Wave segments on IDirectMusicSegment8.
parent
1a85a57e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
1 deletion
+49
-1
segment.c
dlls/dmime/segment.c
+49
-1
No files found.
dlls/dmime/segment.c
View file @
41b9ae33
...
...
@@ -1156,6 +1156,35 @@ static HRESULT IDirectMusicSegment8Impl_IPersistStream_ParseSegmentForm (LPPERSI
return
S_OK
;
}
static
HRESULT
IDirectMusicSegment8Impl_IPersistStream_LoadWave
(
LPPERSISTSTREAM
iface
,
IStream
*
pClonedStream
,
IDirectMusicObject
**
ppWaveObject
)
{
HRESULT
hr
=
E_FAIL
;
IPersistStream
*
pPersistStream
=
NULL
;
hr
=
CoCreateInstance
(
&
CLSID_DirectSoundWave
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicObject
,
(
LPVOID
*
)
ppWaveObject
);
if
(
FAILED
(
hr
))
{
ERR
(
": could not create object
\n
"
);
return
hr
;
}
/* acquire PersistStream interface */
hr
=
IDirectMusicTrack_QueryInterface
(
*
ppWaveObject
,
&
IID_IPersistStream
,
(
LPVOID
*
)
&
pPersistStream
);
if
(
FAILED
(
hr
))
{
ERR
(
": could not acquire IPersistStream
\n
"
);
return
hr
;
}
/* load */
hr
=
IPersistStream_Load
(
pPersistStream
,
pClonedStream
);
if
(
FAILED
(
hr
))
{
ERR
(
": failed to load object
\n
"
);
return
hr
;
}
/* release all loading-related stuff */
IPersistStream_Release
(
pPersistStream
);
return
S_OK
;
}
HRESULT
WINAPI
IDirectMusicSegment8Impl_IPersistStream_Load
(
LPPERSISTSTREAM
iface
,
IStream
*
pStm
)
{
ICOM_THIS_MULTI
(
IDirectMusicSegment8Impl
,
PersistStreamVtbl
,
iface
);
...
...
@@ -1183,7 +1212,26 @@ HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_Load (LPPERSISTSTREAM ifa
break
;
}
case
mmioFOURCC
(
'W'
,
'A'
,
'V'
,
'E'
):
{
FIXME_
(
dmfile
)(
": WAVE form (loading not yet implemented)
\n
"
);
LPSTREAM
pClonedStream
=
NULL
;
IDirectMusicObject
*
pWave
=
NULL
;
FIXME_
(
dmfile
)(
": WAVE form (loading to be checked)
\n
"
);
IStream_Clone
(
pStm
,
&
pClonedStream
);
liMove
.
QuadPart
=
0
;
liMove
.
QuadPart
-=
sizeof
(
FOURCC
)
+
(
sizeof
(
FOURCC
)
+
sizeof
(
DWORD
));
IStream_Seek
(
pClonedStream
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
hr
=
IDirectMusicSegment8Impl_IPersistStream_LoadWave
(
iface
,
pClonedStream
,
&
pWave
);
if
(
FAILED
(
hr
))
{
ERR
(
": could not load track
\n
"
);
return
hr
;
}
IStream_Release
(
pClonedStream
);
IDirectMusicTrack_Release
(
pWave
);
pWave
=
NULL
;
/* now we can release at as it inserted */
liMove
.
QuadPart
=
StreamSize
;
IStream_Seek
(
pStm
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
/* skip the rest of the chunk */
break
;
...
...
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