Rok Mandeljc | 473c565 | 2003-07-21 22:10:14 +0000 | [diff] [blame] | 1 | /* DirectMusicSynthesizer Private Include |
| 2 | * |
Rok Mandeljc | 0382ea1 | 2004-01-20 00:21:40 +0000 | [diff] [blame] | 3 | * Copyright (C) 2003-2004 Rok Mandeljc |
Rok Mandeljc | 473c565 | 2003-07-21 22:10:14 +0000 | [diff] [blame] | 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU Library General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 18 | */ |
| 19 | |
| 20 | #ifndef __WINE_DMSYNTH_PRIVATE_H |
| 21 | #define __WINE_DMSYNTH_PRIVATE_H |
| 22 | |
Alexandre Julliard | e37c6e1 | 2003-09-05 23:08:26 +0000 | [diff] [blame] | 23 | #include <stdarg.h> |
| 24 | |
Rok Mandeljc | 473c565 | 2003-07-21 22:10:14 +0000 | [diff] [blame] | 25 | #include "windef.h" |
Rok Mandeljc | 473c565 | 2003-07-21 22:10:14 +0000 | [diff] [blame] | 26 | #include "winbase.h" |
| 27 | #include "winnt.h" |
Alexandre Julliard | e37c6e1 | 2003-09-05 23:08:26 +0000 | [diff] [blame] | 28 | #include "wingdi.h" |
Rok Mandeljc | 0382ea1 | 2004-01-20 00:21:40 +0000 | [diff] [blame] | 29 | #include "winuser.h" |
| 30 | |
| 31 | #include "wine/debug.h" |
| 32 | #include "wine/list.h" |
| 33 | #include "wine/unicode.h" |
| 34 | #include "winreg.h" |
| 35 | |
Rok Mandeljc | 473c565 | 2003-07-21 22:10:14 +0000 | [diff] [blame] | 36 | #include "dmusici.h" |
Rok Mandeljc | 473c565 | 2003-07-21 22:10:14 +0000 | [diff] [blame] | 37 | #include "dmusicf.h" |
Rok Mandeljc | 0382ea1 | 2004-01-20 00:21:40 +0000 | [diff] [blame] | 38 | #include "dmusics.h" |
Rok Mandeljc | 473c565 | 2003-07-21 22:10:14 +0000 | [diff] [blame] | 39 | |
| 40 | /***************************************************************************** |
| 41 | * Interfaces |
| 42 | */ |
| 43 | typedef struct IDirectMusicSynth8Impl IDirectMusicSynth8Impl; |
| 44 | typedef struct IDirectMusicSynthSinkImpl IDirectMusicSynthSinkImpl; |
| 45 | |
| 46 | /***************************************************************************** |
| 47 | * Predeclare the interface implementation structures |
| 48 | */ |
| 49 | extern ICOM_VTABLE(IDirectMusicSynth8) DirectMusicSynth8_Vtbl; |
| 50 | extern ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink_Vtbl; |
| 51 | |
| 52 | /***************************************************************************** |
| 53 | * ClassFactory |
| 54 | */ |
Rok Mandeljc | 0382ea1 | 2004-01-20 00:21:40 +0000 | [diff] [blame] | 55 | extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter); |
| 56 | extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSinkImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter); |
Rok Mandeljc | 473c565 | 2003-07-21 22:10:14 +0000 | [diff] [blame] | 57 | |
| 58 | /***************************************************************************** |
| 59 | * IDirectMusicSynth8Impl implementation structure |
| 60 | */ |
Rok Mandeljc | 0382ea1 | 2004-01-20 00:21:40 +0000 | [diff] [blame] | 61 | struct IDirectMusicSynth8Impl { |
Rok Mandeljc | 473c565 | 2003-07-21 22:10:14 +0000 | [diff] [blame] | 62 | /* IUnknown fields */ |
| 63 | ICOM_VFIELD(IDirectMusicSynth8); |
| 64 | DWORD ref; |
| 65 | |
| 66 | /* IDirectMusicSynth8 fields */ |
| 67 | DMUS_PORTCAPS pCaps; |
| 68 | BOOL fActive; |
| 69 | IReferenceClock* pLatencyClock; |
| 70 | IDirectMusicSynthSinkImpl* pSynthSink; |
| 71 | }; |
| 72 | |
| 73 | /* IUnknown: */ |
| 74 | extern HRESULT WINAPI IDirectMusicSynth8Impl_QueryInterface (LPDIRECTMUSICSYNTH8 iface, REFIID riid, LPVOID *ppobj); |
| 75 | extern ULONG WINAPI IDirectMusicSynth8Impl_AddRef (LPDIRECTMUSICSYNTH8 iface); |
| 76 | extern ULONG WINAPI IDirectMusicSynth8Impl_Release (LPDIRECTMUSICSYNTH8 iface); |
| 77 | /* IDirectMusicSynth: */ |
| 78 | extern HRESULT WINAPI IDirectMusicSynth8Impl_Open (LPDIRECTMUSICSYNTH8 iface, LPDMUS_PORTPARAMS pPortParams); |
| 79 | extern HRESULT WINAPI IDirectMusicSynth8Impl_Close (LPDIRECTMUSICSYNTH8 iface); |
| 80 | extern HRESULT WINAPI IDirectMusicSynth8Impl_SetNumChannelGroups (LPDIRECTMUSICSYNTH8 iface, DWORD dwGroups); |
| 81 | extern HRESULT WINAPI IDirectMusicSynth8Impl_Download (LPDIRECTMUSICSYNTH8 iface, LPHANDLE phDownload, LPVOID pvData, LPBOOL pbFree); |
| 82 | extern HRESULT WINAPI IDirectMusicSynth8Impl_Unload (LPDIRECTMUSICSYNTH8 iface, HANDLE hDownload, HRESULT (CALLBACK* lpFreeHandle)(HANDLE,HANDLE), HANDLE hUserData); |
| 83 | extern HRESULT WINAPI IDirectMusicSynth8Impl_PlayBuffer (LPDIRECTMUSICSYNTH8 iface, REFERENCE_TIME rt, LPBYTE pbBuffer, DWORD cbBuffer); |
| 84 | extern HRESULT WINAPI IDirectMusicSynth8Impl_GetRunningStats (LPDIRECTMUSICSYNTH8 iface, LPDMUS_SYNTHSTATS pStats); |
| 85 | extern HRESULT WINAPI IDirectMusicSynth8Impl_GetPortCaps (LPDIRECTMUSICSYNTH8 iface, LPDMUS_PORTCAPS pCaps); |
| 86 | extern HRESULT WINAPI IDirectMusicSynth8Impl_SetMasterClock (LPDIRECTMUSICSYNTH8 iface, IReferenceClock* pClock); |
| 87 | extern HRESULT WINAPI IDirectMusicSynth8Impl_GetLatencyClock (LPDIRECTMUSICSYNTH8 iface, IReferenceClock** ppClock); |
| 88 | extern HRESULT WINAPI IDirectMusicSynth8Impl_Activate (LPDIRECTMUSICSYNTH8 iface, BOOL fEnable); |
| 89 | extern HRESULT WINAPI IDirectMusicSynth8Impl_SetSynthSink (LPDIRECTMUSICSYNTH8 iface, IDirectMusicSynthSink* pSynthSink); |
| 90 | extern HRESULT WINAPI IDirectMusicSynth8Impl_Render (LPDIRECTMUSICSYNTH8 iface, short* pBuffer, DWORD dwLength, LONGLONG llPosition); |
| 91 | extern HRESULT WINAPI IDirectMusicSynth8Impl_SetChannelPriority (LPDIRECTMUSICSYNTH8 iface, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority); |
| 92 | extern HRESULT WINAPI IDirectMusicSynth8Impl_GetChannelPriority (LPDIRECTMUSICSYNTH8 iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority); |
| 93 | extern HRESULT WINAPI IDirectMusicSynth8Impl_GetFormat (LPDIRECTMUSICSYNTH8 iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSiz); |
| 94 | extern HRESULT WINAPI IDirectMusicSynth8Impl_GetAppend (LPDIRECTMUSICSYNTH8 iface, DWORD* pdwAppend); |
| 95 | /* IDirectMusicSynth8: */ |
| 96 | extern HRESULT WINAPI IDirectMusicSynth8Impl_PlayVoice (LPDIRECTMUSICSYNTH8 iface, REFERENCE_TIME rt, DWORD dwVoiceId, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwDLId, long prPitch, long vrVolume, SAMPLE_TIME stVoiceStart, SAMPLE_TIME stLoopStart, SAMPLE_TIME stLoopEnd); |
| 97 | extern HRESULT WINAPI IDirectMusicSynth8Impl_StopVoice (LPDIRECTMUSICSYNTH8 iface, REFERENCE_TIME rt, DWORD dwVoiceId); |
| 98 | extern HRESULT WINAPI IDirectMusicSynth8Impl_GetVoiceState (LPDIRECTMUSICSYNTH8 iface, DWORD dwVoice[], DWORD cbVoice, DMUS_VOICE_STATE dwVoiceState[]); |
| 99 | extern HRESULT WINAPI IDirectMusicSynth8Impl_Refresh (LPDIRECTMUSICSYNTH8 iface, DWORD dwDownloadID, DWORD dwFlags); |
| 100 | extern HRESULT WINAPI IDirectMusicSynth8Impl_AssignChannelToBuses (LPDIRECTMUSICSYNTH8 iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwBuses, DWORD cBuses); |
| 101 | |
| 102 | /***************************************************************************** |
| 103 | * IDirectMusicSynthSinkImpl implementation structure |
| 104 | */ |
Rok Mandeljc | 0382ea1 | 2004-01-20 00:21:40 +0000 | [diff] [blame] | 105 | struct IDirectMusicSynthSinkImpl { |
Rok Mandeljc | 473c565 | 2003-07-21 22:10:14 +0000 | [diff] [blame] | 106 | /* IUnknown fields */ |
| 107 | ICOM_VFIELD(IDirectMusicSynthSink); |
| 108 | DWORD ref; |
| 109 | |
| 110 | /* IDirectMusicSynthSinkImpl fields */ |
| 111 | }; |
| 112 | |
| 113 | /* IUnknown: */ |
| 114 | extern HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface (LPDIRECTMUSICSYNTHSINK iface, REFIID riid, LPVOID *ppobj); |
| 115 | extern ULONG WINAPI IDirectMusicSynthSinkImpl_AddRef (LPDIRECTMUSICSYNTHSINK iface); |
| 116 | extern ULONG WINAPI IDirectMusicSynthSinkImpl_Release (LPDIRECTMUSICSYNTHSINK iface); |
| 117 | /* IDirectMusicSynthSinkImpl: */ |
| 118 | extern HRESULT WINAPI IDirectMusicSynthSinkImpl_Init (LPDIRECTMUSICSYNTHSINK iface, IDirectMusicSynth* pSynth); |
| 119 | extern HRESULT WINAPI IDirectMusicSynthSinkImpl_SetMasterClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock* pClock); |
| 120 | extern HRESULT WINAPI IDirectMusicSynthSinkImpl_GetLatencyClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock** ppClock); |
| 121 | extern HRESULT WINAPI IDirectMusicSynthSinkImpl_Activate (LPDIRECTMUSICSYNTHSINK iface, BOOL fEnable); |
| 122 | extern HRESULT WINAPI IDirectMusicSynthSinkImpl_SampleToRefTime (LPDIRECTMUSICSYNTHSINK iface, LONGLONG llSampleTime, REFERENCE_TIME* prfTime); |
| 123 | extern HRESULT WINAPI IDirectMusicSynthSinkImpl_RefTimeToSample (LPDIRECTMUSICSYNTHSINK iface, REFERENCE_TIME rfTime, LONGLONG* pllSampleTime); |
| 124 | extern HRESULT WINAPI IDirectMusicSynthSinkImpl_SetDirectSound (LPDIRECTMUSICSYNTHSINK iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer); |
| 125 | extern HRESULT WINAPI IDirectMusicSynthSinkImpl_GetDesiredBufferSize (LPDIRECTMUSICSYNTHSINK iface, LPDWORD pdwBufferSizeInSamples); |
| 126 | |
| 127 | #endif /* __WINE_DMSYNTH_PRIVATE_H */ |