wine/dlls/dmime/dmime_private.h

405 lines
14 KiB
C
Raw Normal View History

2003-07-21 22:10:14 +00:00
/* DirectMusicInteractiveEngine Private Include
*
* Copyright (C) 2003-2004 Rok Mandeljc
2003-07-21 22:10:14 +00:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __WINE_DMIME_PRIVATE_H
#define __WINE_DMIME_PRIVATE_H
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#define COBJMACROS
2003-07-21 22:10:14 +00:00
#include "windef.h"
#include "winbase.h"
#include "winnt.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "wine/unicode.h"
#include "winreg.h"
#include "objbase.h"
2003-07-21 22:10:14 +00:00
#include "dmusici.h"
#include "dmusicf.h"
#include "dmusics.h"
2003-07-21 22:10:14 +00:00
/*****************************************************************************
* Interfaces
*/
typedef struct IDirectMusicPerformance8Impl IDirectMusicPerformance8Impl;
typedef struct IDirectMusicSegment8Impl IDirectMusicSegment8Impl;
typedef struct IDirectMusicSegmentState8Impl IDirectMusicSegmentState8Impl;
typedef struct IDirectMusicGraphImpl IDirectMusicGraphImpl;
typedef struct IDirectMusicAudioPathImpl IDirectMusicAudioPathImpl;
typedef struct IDirectMusicTool8Impl IDirectMusicTool8Impl;
typedef struct IDirectMusicPatternTrackImpl IDirectMusicPatternTrackImpl;
typedef struct IDirectMusicLyricsTrack IDirectMusicLyricsTrack;
typedef struct IDirectMusicMarkerTrack IDirectMusicMarkerTrack;
typedef struct IDirectMusicParamControlTrack IDirectMusicParamControlTrack;
typedef struct IDirectMusicSegTriggerTrack IDirectMusicSegTriggerTrack;
typedef struct IDirectMusicSeqTrack IDirectMusicSeqTrack;
typedef struct IDirectMusicSysExTrack IDirectMusicSysExTrack;
typedef struct IDirectMusicTempoTrack IDirectMusicTempoTrack;
typedef struct IDirectMusicTimeSigTrack IDirectMusicTimeSigTrack;
typedef struct IDirectMusicWaveTrack IDirectMusicWaveTrack;
2003-07-21 22:10:14 +00:00
/*****************************************************************************
* ClassFactory
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicPerformanceImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicGraphImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicAudioPathImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicToolImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicPatternTrackImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicLyricsTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicMarkerTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicParamControlTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegTriggerTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSeqTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSysExTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicTempoTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicTimeSigTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicWaveTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
/*****************************************************************************
* Auxiliary definitions
*/
typedef struct _DMUS_PRIVATE_SEGMENT_TRACK {
struct list entry; /* for listing elements */
DWORD dwGroupBits;
IDirectMusicTrack* pTrack;
} DMUS_PRIVATE_SEGMENT_TRACK, *LPDMUS_PRIVATE_SEGMENT_TRACK;
typedef struct _DMUS_PRIVATE_TEMPO_ITEM {
struct list entry; /* for listing elements */
DMUS_IO_TEMPO_ITEM item;
} DMUS_PRIVATE_TEMPO_ITEM, *LPDMUS_PRIVATE_TEMPO_ITEM;
typedef struct _DMUS_PRIVATE_SEGMENT_ITEM {
struct list entry; /* for listing elements */
DMUS_IO_SEGMENT_ITEM_HEADER header;
IDirectMusicObject* pObject;
WCHAR wszName[DMUS_MAX_NAME];
} DMUS_PRIVATE_SEGMENT_ITEM, *LPDMUS_PRIVATE_SEGMENT_ITEM;
typedef struct _DMUS_PRIVATE_GRAPH_TOOL {
struct list entry; /* for listing elements */
DWORD dwIndex;
IDirectMusicTool* pTool;
} DMUS_PRIVATE_GRAPH_TOOL, *LPDMUS_PRIVATE_GRAPH_TOOL;
typedef struct _DMUS_PRIVATE_TEMPO_PLAY_STATE {
DWORD dummy;
} DMUS_PRIVATE_TEMPO_PLAY_STATE, *LPDMUS_PRIVATE_TEMPO_PLAY_STATE;
/* some sort of aux. performance channel: as far as i can understand, these are
used to represent a particular midi channel in particular group at particular
group; so all we need to do is to fill it with parent port, group and midi
channel ? */
typedef struct DMUSIC_PRIVATE_PCHANNEL_ {
DWORD channel; /* map to this channel... */
DWORD group; /* ... in this group ... */
IDirectMusicPort *port; /* ... at this port */
} DMUSIC_PRIVATE_PCHANNEL, *LPDMUSIC_PRIVATE_PCHANNEL;
2003-07-21 22:10:14 +00:00
/*****************************************************************************
* IDirectMusicPerformance8Impl implementation structure
*/
struct IDirectMusicPerformance8Impl {
2003-07-21 22:10:14 +00:00
/* IUnknown fields */
const IDirectMusicPerformance8Vtbl *lpVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
2003-07-21 22:10:14 +00:00
/* IDirectMusicPerformanceImpl fields */
IDirectMusic8* pDirectMusic;
IDirectSound* pDirectSound;
IDirectMusicGraph* pToolGraph;
DMUS_AUDIOPARAMS pParams;
/* global parameters */
BOOL fAutoDownload;
char cMasterGrooveLevel;
float fMasterTempo;
long lMasterVolume;
/* performance channels */
DMUSIC_PRIVATE_PCHANNEL PChannel[1];
/* IDirectMusicPerformance8Impl fields */
IDirectMusicAudioPath* pDefaultPath;
HANDLE hNotification;
REFERENCE_TIME rtMinimum;
REFERENCE_TIME rtLatencyTime;
DWORD dwBumperLength;
DWORD dwPrepareTime;
/** Message Processing */
HANDLE procThread;
DWORD procThreadId;
REFERENCE_TIME procThreadStartTime;
BOOL procThreadTicStarted;
CRITICAL_SECTION safe;
struct DMUS_PMSGItem* head;
struct DMUS_PMSGItem* imm_head;
2003-07-21 22:10:14 +00:00
};
/*****************************************************************************
* IDirectMusicSegment8Impl implementation structure
*/
struct IDirectMusicSegment8Impl {
2003-07-21 22:10:14 +00:00
/* IUnknown fields */
const IUnknownVtbl *UnknownVtbl;
const IDirectMusicSegment8Vtbl *SegmentVtbl;
const IDirectMusicObjectVtbl *ObjectVtbl;
const IPersistStreamVtbl *PersistStreamVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
2003-07-21 22:10:14 +00:00
/* IDirectMusicSegment8Impl fields */
LPDMUS_OBJECTDESC pDesc;
DMUS_IO_SEGMENT_HEADER header;
IDirectMusicGraph* pGraph;
struct list Tracks;
2003-07-21 22:10:14 +00:00
};
/*****************************************************************************
* IDirectMusicSegmentState8Impl implementation structure
*/
struct IDirectMusicSegmentState8Impl {
2003-07-21 22:10:14 +00:00
/* IUnknown fields */
const IDirectMusicSegmentState8Vtbl *lpVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
2003-07-21 22:10:14 +00:00
/* IDirectMusicSegmentState8Impl fields */
};
/*****************************************************************************
* IDirectMusicGraphImpl implementation structure
*/
struct IDirectMusicGraphImpl {
2003-07-21 22:10:14 +00:00
/* IUnknown fields */
const IUnknownVtbl *UnknownVtbl;
const IDirectMusicGraphVtbl *GraphVtbl;
const IDirectMusicObjectVtbl *ObjectVtbl;
const IPersistStreamVtbl *PersistStreamVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
2003-07-21 22:10:14 +00:00
/* IDirectMusicGraphImpl fields */
LPDMUS_OBJECTDESC pDesc;
WORD num_tools;
struct list Tools;
2003-07-21 22:10:14 +00:00
};
/*****************************************************************************
* IDirectMusicAudioPathImpl implementation structure
*/
struct IDirectMusicAudioPathImpl {
2003-07-21 22:10:14 +00:00
/* IUnknown fields */
const IUnknownVtbl *UnknownVtbl;
const IDirectMusicAudioPathVtbl *AudioPathVtbl;
const IDirectMusicObjectVtbl *ObjectVtbl;
const IPersistStreamVtbl *PersistStreamVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
2003-07-21 22:10:14 +00:00
/* IDirectMusicAudioPathImpl fields */
LPDMUS_OBJECTDESC pDesc;
2003-07-21 22:10:14 +00:00
IDirectMusicPerformance8* pPerf;
IDirectMusicGraph* pToolGraph;
IDirectSoundBuffer* pDSBuffer;
IDirectSoundBuffer* pPrimary;
BOOL fActive;
2003-07-21 22:10:14 +00:00
};
/*****************************************************************************
* IDirectMusicTool8Impl implementation structure
*/
struct IDirectMusicTool8Impl {
2003-07-21 22:10:14 +00:00
/* IUnknown fields */
const IDirectMusicTool8Vtbl *lpVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
2003-07-21 22:10:14 +00:00
/* IDirectMusicTool8Impl fields */
};
/*****************************************************************************
* IDirectMusicPatternTrackImpl implementation structure
*/
struct IDirectMusicPatternTrackImpl {
/* IUnknown fields */
const IDirectMusicPatternTrackVtbl *lpVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
/* IDirectMusicPatternTrackImpl fields */
};
/*****************************************************************************
* IDirectMusicLyricsTrack implementation structure
*/
struct IDirectMusicLyricsTrack
2003-07-21 22:10:14 +00:00
{
/* IUnknown fields */
const IUnknownVtbl *UnknownVtbl;
const IDirectMusicTrack8Vtbl *TrackVtbl;
const IPersistStreamVtbl *PersistStreamVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
2003-07-21 22:10:14 +00:00
/* IDirectMusicLyricsTrack fields */
LPDMUS_OBJECTDESC pDesc;
2003-07-21 22:10:14 +00:00
};
/*****************************************************************************
* IDirectMusicMarkerTrack implementation structure
*/
struct IDirectMusicMarkerTrack {
/* IUnknown fields */
const IUnknownVtbl *UnknownVtbl;
const IDirectMusicTrack8Vtbl *TrackVtbl;
const IPersistStreamVtbl *PersistStreamVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
/* IDirectMusicMarkerTrack fields */
LPDMUS_OBJECTDESC pDesc;
};
/*****************************************************************************
* IDirectMusicParamControlTrack implementation structure
*/
struct IDirectMusicParamControlTrack {
/* IUnknown fields */
const IUnknownVtbl *UnknownVtbl;
const IDirectMusicTrack8Vtbl *TrackVtbl;
const IPersistStreamVtbl *PersistStreamVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
/* IDirectMusicParamControlTrack fields */
LPDMUS_OBJECTDESC pDesc;
};
/*****************************************************************************
* IDirectMusicSegTriggerTrack implementation structure
*/
struct IDirectMusicSegTriggerTrack {
/* IUnknown fields */
const IUnknownVtbl *UnknownVtbl;
const IDirectMusicTrack8Vtbl *TrackVtbl;
const IPersistStreamVtbl *PersistStreamVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
/* IDirectMusicSegTriggerTrack fields */
LPDMUS_OBJECTDESC pDesc;
struct list Items;
};
/*****************************************************************************
* IDirectMusicSeqTrack implementation structure
*/
struct IDirectMusicSeqTrack {
/* IUnknown fields */
const IUnknownVtbl *UnknownVtbl;
const IDirectMusicTrack8Vtbl *TrackVtbl;
const IPersistStreamVtbl *PersistStreamVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
/* IDirectMusicSeqTrack fields */
LPDMUS_OBJECTDESC pDesc;
};
/*****************************************************************************
* IDirectMusicSysExTrack implementation structure
*/
struct IDirectMusicSysExTrack {
/* IUnknown fields */
const IUnknownVtbl *UnknownVtbl;
const IDirectMusicTrack8Vtbl *TrackVtbl;
const IPersistStreamVtbl *PersistStreamVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
/* IDirectMusicSysExTrack fields */
LPDMUS_OBJECTDESC pDesc;
};
/*****************************************************************************
* IDirectMusicTempoTrack implementation structure
*/
struct IDirectMusicTempoTrack {
/* IUnknown fields */
const IUnknownVtbl *UnknownVtbl;
const IDirectMusicTrack8Vtbl *TrackVtbl;
const IPersistStreamVtbl *PersistStreamVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
/* IDirectMusicTempoTrack fields */
LPDMUS_OBJECTDESC pDesc;
BOOL enabled;
struct list Items;
};
/*****************************************************************************
* IDirectMusicTimeSigTrack implementation structure
*/
struct IDirectMusicTimeSigTrack {
/* IUnknown fields */
const IUnknownVtbl *UnknownVtbl;
const IDirectMusicTrack8Vtbl *TrackVtbl;
const IPersistStreamVtbl *PersistStreamVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
/* IDirectMusicTimeSigTrack fields */
LPDMUS_OBJECTDESC pDesc;
};
/*****************************************************************************
* IDirectMusicWaveTrack implementation structure
*/
struct IDirectMusicWaveTrack {
/* IUnknown fields */
const IUnknownVtbl *UnknownVtbl;
const IDirectMusicTrack8Vtbl *TrackVtbl;
const IPersistStreamVtbl *PersistStreamVtbl;
2005-07-12 17:03:19 +00:00
LONG ref;
/* IDirectMusicWaveTrack fields */
LPDMUS_OBJECTDESC pDesc;
};
/**********************************************************************
* Dll lifetime tracking declaration for dmime.dll
*/
extern LONG DMIME_refCount;
2005-06-20 14:18:03 +00:00
static inline void DMIME_LockModule(void) { InterlockedIncrement( &DMIME_refCount ); }
static inline void DMIME_UnlockModule(void) { InterlockedDecrement( &DMIME_refCount ); }
/*****************************************************************************
* Misc.
*/
#include "dmutils.h"
2003-07-21 22:10:14 +00:00
#endif /* __WINE_DMIME_PRIVATE_H */