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
6c9b097f
Commit
6c9b097f
authored
Jun 24, 2003
by
Rok Mandeljc
Committed by
Alexandre Julliard
Jun 24, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added framework for file loading.
parent
018e3cc6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
96 additions
and
8 deletions
+96
-8
Makefile.in
dlls/dmusic/Makefile.in
+2
-1
dmusic_loader.c
dlls/dmusic/dmusic_loader.c
+36
-5
dmusic_performance.c
dlls/dmusic/dmusic_performance.c
+2
-2
dmusic_private.h
dlls/dmusic/dmusic_private.h
+56
-0
helper.c
dlls/dmusic/helper.c
+0
-0
No files found.
dlls/dmusic/Makefile.in
View file @
6c9b097f
...
...
@@ -20,7 +20,8 @@ C_SRCS = \
dmusic_port.c
\
dmusic_segment.c
\
dmusic_style.c
\
dmusic_synth.c
dmusic_synth.c
\
helper.c
RC_SRCS
=
version.rc
...
...
dlls/dmusic/dmusic_loader.c
View file @
6c9b097f
...
...
@@ -312,18 +312,48 @@ HRESULT WINAPI IDirectMusicLoader8Impl_LoadObjectFromFile (LPDIRECTMUSICLOADER8
WCHAR
*
pwzFilePath
,
void
**
ppObject
)
{
HANDLE
fd
;
ICOM_THIS
(
IDirectMusicLoader8Impl
,
iface
);
FIXME
(
"(%p, %s, %s, %s, %p): stub
\n
"
,
This
,
debugstr_guid
(
rguidClassID
),
debugstr_guid
(
iidInterfaceID
),
debugstr_w
(
pwzFilePath
),
ppObject
);
if
(
IsEqualGUID
(
iidInterfaceID
,
&
CLSID_DirectSoundWave
))
{
FIXME
(
"wanted 'wav'
\n
"
);
}
else
if
(
IsEqualGUID
(
iidInterfaceID
,
&
CLSID_DirectMusicScript
))
{
FIXME
(
"wanted 'spt'
\n
"
);
}
else
if
(
IsEqualGUID
(
iidInterfaceID
,
&
CLSID_DirectMusicContainer
))
{
fd
=
CreateFileW
(
pwzFilePath
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
!
fd
)
{
WARN
(
"could not load file
\n
"
);
return
DMUS_E_LOADER_FAILEDOPEN
;
}
if
(
IsEqualGUID
(
rguidClassID
,
&
CLSID_DirectMusicAudioPathConfig
))
{
FIXME
(
"wanted 'aud'
\n
"
);
}
else
if
(
IsEqualGUID
(
rguidClassID
,
&
CLSID_DirectMusicBand
))
{
FIXME
(
"wanted 'bnd'
\n
"
);
DMUSIC_FillBandFromFileHandle
(
NULL
,
fd
);
}
else
if
(
IsEqualGUID
(
rguidClassID
,
&
CLSID_DirectMusicContainer
))
{
FIXME
(
"wanted 'con'
\n
"
);
}
else
if
(
IsEqualGUID
(
rguidClassID
,
&
CLSID_DirectMusicCollection
))
{
FIXME
(
"wanted 'dls'
\n
"
);
}
else
if
(
IsEqualGUID
(
rguidClassID
,
&
CLSID_DirectMusicChordMap
))
{
FIXME
(
"wanted 'cdm'
\n
"
);
}
else
if
(
IsEqualGUID
(
rguidClassID
,
&
CLSID_DirectMusicSegment
))
{
FIXME
(
"wanted 'sgt'
\n
"
);
DMUSIC_FillSegmentFromFileHandle
(
NULL
,
fd
);
}
else
if
(
IsEqualGUID
(
rguidClassID
,
&
CLSID_DirectMusicScript
))
{
FIXME
(
"wanted 'spt'
\n
"
);
}
else
if
(
IsEqualGUID
(
rguidClassID
,
&
CLSID_DirectMusicSong
))
{
FIXME
(
"wanted 'sng'
\n
"
);
}
else
if
(
IsEqualGUID
(
rguidClassID
,
&
CLSID_DirectMusicStyle
))
{
FIXME
(
"wanted 'sty'
\n
"
);
}
else
if
(
IsEqualGUID
(
rguidClassID
,
&
CLSID_DirectMusicSegment
))
{
FIXME
(
"wanted 'tpl'
\n
"
);
}
else
if
(
IsEqualGUID
(
rguidClassID
,
&
CLSID_DirectMusicGraph
))
{
FIXME
(
"wanted 'tgr'
\n
"
);
}
else
if
(
IsEqualGUID
(
rguidClassID
,
&
CLSID_DirectSoundWave
))
{
FIXME
(
"wanted 'wav'
\n
"
);
}
CloseHandle
(
fd
);
if
(
IsEqualGUID
(
iidInterfaceID
,
&
IID_IDirectMusicSegment
)
||
IsEqualGUID
(
iidInterfaceID
,
&
IID_IDirectMusicSegment8
))
{
IDirectMusicSegment8Impl
*
segment
;
...
...
@@ -331,6 +361,7 @@ HRESULT WINAPI IDirectMusicLoader8Impl_LoadObjectFromFile (LPDIRECTMUSICLOADER8
segment
->
lpVtbl
=
&
DirectMusicSegment8_Vtbl
;
segment
->
ref
=
1
;
*
ppObject
=
segment
;
return
S_OK
;
}
else
if
(
IsEqualGUID
(
iidInterfaceID
,
&
IID_IDirectMusicContainer
))
{
IDirectMusicContainerImpl
*
container
;
container
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IDirectMusicContainerImpl
));
...
...
dlls/dmusic/dmusic_performance.c
View file @
6c9b097f
...
...
@@ -1029,8 +1029,8 @@ HRESULT WINAPI IDirectMusicPerformance8ImplInitAudio (LPDIRECTMUSICPERFORMANCE8
IDirectMusicPerformance8Impl_Init
(
iface
,
ppDirectMusic
,
This
->
dsound
,
hWnd
);
/* Init increases the ref count of the dsound object. Decremente it if the app don't want a pointer to the object. */
if
(
!
ppDirectSound
)
IDirectSound_Release
(
*
ppDirectSound
);
/*
if (!ppDirectSound)
IDirectSound_Release(*ppDirectSound);
*/
/* as seen in msdn we need params init before audio path creation */
if
(
NULL
!=
pParams
)
{
...
...
dlls/dmusic/dmusic_private.h
View file @
6c9b097f
...
...
@@ -152,6 +152,56 @@ typedef struct DMUSIC_PRIVATE_CHANNEL_GROUP_
DMUSIC_PRIVATE_MCHANNEL
channel
[
16
];
/* 16 channels in a group */
}
DMUSIC_PRIVATE_CHANNEL_GROUP
,
*
LPDMUSIC_PRIVATE_CHANNEL_GROUP
;
/* used for loading chunks of data from files */
typedef
struct
_rawChunk
{
FOURCC
id
;
/* FOURCC */
DWORD
size
;
/* size of chunk_riff */
/* BYTE* data; */
/* chunk_riff data */
}
rawChunk
;
/* struct in which UNFO data is stored */
typedef
struct
_UNFO_List
{
WCHAR
*
name
;
WCHAR
*
artist
;
WCHAR
*
copyright
;
WCHAR
*
version
;
WCHAR
*
subject
;
WCHAR
*
comment
;
}
UNFO_List
;
typedef
struct
_ChordData
{
DMUS_IO_CHORD
chord
;
DWORD
nrofsubchords
;
DMUS_IO_SUBCHORD
*
subchord
;
}
ChordData
;
typedef
struct
_Reference
{
DMUS_IO_REFERENCE
header
;
GUID
guid
;
FILETIME
date
;
WCHAR
*
name
;
WCHAR
*
file
;
WCHAR
*
category
;
DMUS_IO_VERSION
version
;
}
Reference
;
typedef
struct
_BandTrack
{
DMUS_IO_BAND_TRACK_HEADER
header
;
GUID
guid
;
DMUS_IO_VERSION
version
;
UNFO_List
UNFO
;
DMUS_IO_BAND_ITEM_HEADER
header1
;
DMUS_IO_BAND_ITEM_HEADER2
header2
;
/* IDirectMusicBandImpl **band; */
}
BandTrack
;
/*****************************************************************************
* IDirectMusicImpl implementation structure
...
...
@@ -1323,5 +1373,11 @@ extern HRESULT WINAPI IDirectMusicSongImpl_EnumSegment (LPDIRECTMUSICSONG iface,
* Helper Functions
*/
void
register_waveport
(
LPGUID
lpGUID
,
LPCSTR
lpszDesc
,
LPCSTR
lpszDrvName
,
LPVOID
lpContext
);
/* Loader Helper Functions */
HRESULT
WINAPI
DMUSIC_FillSegmentFromFileHandle
(
IDirectMusicSegmentImpl
*
segment
,
HANDLE
fd
);
HRESULT
WINAPI
DMUSIC_FillTrackFromFileHandle
(
IDirectMusicTrackImpl
*
segment
,
HANDLE
fd
);
HRESULT
WINAPI
DMUSIC_FillReferenceFromFileHandle
(
Reference
reference
,
HANDLE
fd
);
HRESULT
WINAPI
DMUSIC_FillUNFOFromFileHandle
(
UNFO_List
UNFO
,
HANDLE
fd
);
HRESULT
WINAPI
DMUSIC_FillBandFromFileHandle
(
IDirectMusicBandImpl
*
band
,
HANDLE
fd
);
#endif
/* __WINE_DMUSIC_PRIVATE_H */
dlls/dmusic/helper.c
0 → 100644
View file @
6c9b097f
This diff is collapsed.
Click to expand it.
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