File loading improvements.

This commit is contained in:
Rok Mandeljc 2003-06-30 18:28:52 +00:00 committed by Alexandre Julliard
parent 85147ee96d
commit 12acfb2285
4 changed files with 997 additions and 56 deletions

View File

@ -202,6 +202,7 @@ HRESULT WINAPI IDirectMusicLoader8Impl_LoadObjectFromFile (LPDIRECTMUSICLOADER8
DMUSIC_FillBandFromFileHandle (NULL, fd);
} else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicContainer)) {
FIXME("wanted 'con'\n");
DMUSIC_FillContainerFromFileHandle (NULL, fd);
} else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicCollection)) {
FIXME("wanted 'dls'\n");
} else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicChordMap)) {
@ -211,6 +212,7 @@ HRESULT WINAPI IDirectMusicLoader8Impl_LoadObjectFromFile (LPDIRECTMUSICLOADER8
DMUSIC_FillSegmentFromFileHandle (NULL, fd);
} else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicScript)) {
FIXME("wanted 'spt'\n");
DMUSIC_FillScriptFromFileHandle (NULL, fd);
} else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicSong)) {
FIXME("wanted 'sng'\n");
} else if (IsEqualGUID(rguidClassID, &CLSID_DirectMusicStyle)) {
@ -240,6 +242,13 @@ HRESULT WINAPI IDirectMusicLoader8Impl_LoadObjectFromFile (LPDIRECTMUSICLOADER8
container->ref = 1;
*ppObject = container;
return S_OK;
} else if (IsEqualGUID(iidInterfaceID, &IID_IDirectMusicScript)) {
IDirectMusicScriptImpl* script;
script = HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectMusicScriptImpl));
script->lpVtbl = &DirectMusicScript_Vtbl;
script->ref = 1;
*ppObject = script;
return S_OK;
} else {
FIXME("bad iid\n");
}

View File

@ -76,8 +76,7 @@ HRESULT WINAPI IDirectMusicPerformance8Impl_Init (LPDIRECTMUSICPERFORMANCE8 ifac
{
ICOM_THIS(IDirectMusicPerformance8Impl,iface);
FIXME("(iface = %p, dmusic = %p, dsound = %p, hwnd = %p): forward to IDirectMusicPerformanceImpl::Init\n", This, ppDirectMusic, pDirectSound, hWnd);
FIXME("(iface = %p, dmusic = %p, dsound = %p, hwnd = %p)\n", This, ppDirectMusic, pDirectSound, hWnd);
if (This->dmusic || This->dsound)
return DMUS_E_ALREADY_INITED;
@ -317,7 +316,7 @@ HRESULT WINAPI IDirectMusicPerformance8Impl_RemovePort (LPDIRECTMUSICPERFORMANCE
HRESULT WINAPI IDirectMusicPerformance8Impl_AssignPChannelBlock (LPDIRECTMUSICPERFORMANCE8 iface, DWORD dwBlockNum, IDirectMusicPort* pPort, DWORD dwGroup)
{
int i, j, range /* min value in range */;
int i, j, range /* min value in range */;
ICOM_THIS(IDirectMusicPerformance8Impl,iface);
FIXME("(%p, %ld, %p, %ld): semi-stub\n", This, dwBlockNum, pPort, dwGroup-1);

View File

@ -185,6 +185,65 @@ typedef struct _BandTrack
} BandTrack;
typedef struct _Part
{
DMUS_IO_STYLEPART header;
UNFO_List UNFO;
DWORD nrofnotes;
DMUS_IO_STYLENOTE* notes;
DWORD nrofcurves;
DMUS_IO_STYLECURVE* curves;
DWORD nrofmarkers;
DMUS_IO_STYLEMARKER* markers;
DWORD nrofresolutions;
DMUS_IO_STYLERESOLUTION* resolutions;
DWORD nrofanticipations;
DMUS_IO_STYLE_ANTICIPATION* anticipations;
} Part;
typedef struct _Pattern
{
DMUS_IO_PATTERN header;
DWORD nrofrhytms;
DWORD* rhytms;
UNFO_List UNFO;
DMUS_IO_MOTIFSETTINGS motsettings;
/* IDirectMusicBandImpl band */
DWORD nrofpartrefs;
/* FIXME: only in singular form for now */
UNFO_List partrefUNFO;
DMUS_IO_PARTREF partref;
} Pattern;
typedef struct _WaveTrack
{
DMUS_IO_WAVE_TRACK_HEADER header;
/* FIXME: only in singular form now */
DMUS_IO_WAVE_PART_HEADER partHeader;
DMUS_IO_WAVE_ITEM_HEADER itemHeader;
Reference reference;
} WaveTrack;
typedef struct _SegTriggerTrack
{
DMUS_IO_SEGMENT_TRACK_HEADER header;
/* FIXME: only in singular form now */
DMUS_IO_SEGMENT_ITEM_HEADER itemHeader;
Reference reference;
WCHAR* motifName;
} SegTriggerTrack;
typedef struct _TimeSigTrack {
DWORD nrofitems;
DMUS_IO_TIMESIGNATURE_ITEM* items;
} TimeSigTrack;
typedef struct _ScriptEvent {
DMUS_IO_SCRIPTTRACK_EVENTHEADER header;
Reference reference;
WCHAR* name;
} ScriptEvent;
/*****************************************************************************
* ClassFactory
*
@ -1099,10 +1158,13 @@ extern HRESULT WINAPI IDirectMusicSongImpl_EnumSegment (LPDIRECTMUSICSONG iface,
*/
void register_waveport (LPGUID lpGUID, LPCSTR lpszDesc, LPCSTR lpszDrvName, LPVOID lpContext);
/* Loader Helper Functions */
HRESULT WINAPI DMUSIC_FillSegmentFromFileHandle (IDirectMusicSegment8Impl *segment, HANDLE fd);
HRESULT WINAPI DMUSIC_FillTrackFromFileHandle (IDirectMusicTrack8Impl *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);
HRESULT WINAPI DMUSIC_FillContainerFromFileHandle (IDirectMusicContainerImpl *container, HANDLE fd);
HRESULT WINAPI DMUSIC_FillReferenceFromFileHandle (Reference reference, HANDLE fd);
HRESULT WINAPI DMUSIC_FillScriptFromFileHandle (IDirectMusicScriptImpl *script, HANDLE fd);
HRESULT WINAPI DMUSIC_FillSegmentFromFileHandle (IDirectMusicSegment8Impl *segment, HANDLE fd);
HRESULT WINAPI DMUSIC_FillStyleFromFileHandle (IDirectMusicStyle8Impl *style, HANDLE fd);
HRESULT WINAPI DMUSIC_FillTrackFromFileHandle (IDirectMusicTrack8Impl *segment, HANDLE fd);
HRESULT WINAPI DMUSIC_FillUNFOFromFileHandle (UNFO_List UNFO, HANDLE fd);
#endif /* __WINE_DMUSIC_PRIVATE_H */

File diff suppressed because it is too large Load Diff