source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/dmusics.h@ 1194

Last change on this file since 1194 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 13.0 KB
RevLine 
[1166]1#undef INTERFACE
2/*
3 * DirectMusic Software Synth Definitions
4 *
5 * Copyright (C) 2003-2004 Rok Mandeljc
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#ifndef __WINE_DMUSIC_SOFTWARESYNTH_H
23#define __WINE_DMUSIC_SOFTWARESYNTH_H
24
25#include <dmusicc.h>
26
27/*****************************************************************************
28 * Registry path
29 */
30#define REGSTR_PATH_SOFTWARESYNTHS "Software\\Microsoft\\DirectMusic\\SoftwareSynths"
31
32
33/*****************************************************************************
34 * Predeclare the interfaces
35 */
36/* IIDs */
37DEFINE_GUID(IID_IDirectMusicSynth, 0x09823661,0x5c85,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6);
38DEFINE_GUID(IID_IDirectMusicSynth8, 0x53cab625,0x2711,0x4c9f,0x9d,0xe7,0x1b,0x7f,0x92,0x5f,0x6f,0xc8);
39DEFINE_GUID(IID_IDirectMusicSynthSink, 0x09823663,0x5c85,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6);
40
41/* typedef definitions */
42typedef struct IDirectMusicSynth *LPDIRECTMUSICSYNTH;
43typedef struct IDirectMusicSynth8 *LPDIRECTMUSICSYNTH8;
44typedef struct IDirectMusicSynthSink *LPDIRECTMUSICSYNTHSINK;
45
46/* GUIDs - property set */
47DEFINE_GUID(GUID_DMUS_PROP_SetSynthSink, 0x0a3a5ba5,0x37b6,0x11d2,0xb9,0xf9,0x00,0x00,0xf8,0x75,0xac,0x12);
48DEFINE_GUID(GUID_DMUS_PROP_SinkUsesDSound, 0xbe208857,0x8952,0x11d2,0xba,0x1c,0x00,0x00,0xf8,0x75,0xac,0x12);
49
50
51/*****************************************************************************
52 * Flags
53 */
54#define REFRESH_F_LASTBUFFER 0x1
55
56
57/*****************************************************************************
58 * Structures
59 */
60#ifndef _DMUS_VOICE_STATE_DEFINED
61#define _DMUS_VOICE_STATE_DEFINED
62
63/* typedef definition */
64typedef struct _DMUS_VOICE_STATE DMUS_VOICE_STATE, *LPDMUS_VOICE_STATE;
65
66/* actual structure */
67struct _DMUS_VOICE_STATE {
68 WINBOOL bExists;
69 SAMPLE_POSITION spPosition;
70};
71#endif /* _DMUS_VOICE_STATE_DEFINED */
72
73
74/*****************************************************************************
75 * IDirectMusicSynth interface
76 */
77#define INTERFACE IDirectMusicSynth
78DECLARE_INTERFACE_(IDirectMusicSynth,IUnknown)
79{
80 /*** IUnknown methods ***/
81 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
82 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
83 STDMETHOD_(ULONG,Release)(THIS) PURE;
84 /*** IDirectMusicSynth methods ***/
85 STDMETHOD(Open)(THIS_ LPDMUS_PORTPARAMS pPortParams) PURE;
86 STDMETHOD(Close)(THIS) PURE;
87 STDMETHOD(SetNumChannelGroups)(THIS_ DWORD dwGroups) PURE;
88 STDMETHOD(Download)(THIS_ LPHANDLE phDownload, LPVOID pvData, LPBOOL pbFree) PURE;
89 STDMETHOD(Unload)(THIS_ HANDLE hDownload, HRESULT (CALLBACK* lpFreeHandle)(HANDLE,HANDLE), HANDLE hUserData) PURE;
90 STDMETHOD(PlayBuffer)(THIS_ REFERENCE_TIME rt, LPBYTE pbBuffer, DWORD cbBuffer) PURE;
91 STDMETHOD(GetRunningStats)(THIS_ LPDMUS_SYNTHSTATS pStats) PURE;
92 STDMETHOD(GetPortCaps)(THIS_ LPDMUS_PORTCAPS pCaps) PURE;
93 STDMETHOD(SetMasterClock)(THIS_ IReferenceClock *pClock) PURE;
94 STDMETHOD(GetLatencyClock)(THIS_ IReferenceClock **ppClock) PURE;
95 STDMETHOD(Activate)(THIS_ WINBOOL fEnable) PURE;
96 STDMETHOD(SetSynthSink)(THIS_ struct IDirectMusicSynthSink *pSynthSink) PURE;
97 STDMETHOD(Render)(THIS_ short *pBuffer, DWORD dwLength, LONGLONG llPosition) PURE;
98 STDMETHOD(SetChannelPriority)(THIS_ DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority) PURE;
99 STDMETHOD(GetChannelPriority)(THIS_ DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority) PURE;
100 STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSiz) PURE;
101 STDMETHOD(GetAppend)(THIS_ DWORD *pdwAppend) PURE;
102};
103#undef INTERFACE
104
105#if !defined(__cplusplus) || defined(CINTERFACE)
106/*** IUnknown methods ***/
107#define IDirectMusicSynth_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
108#define IDirectMusicSynth_AddRef(p) (p)->lpVtbl->AddRef(p)
109#define IDirectMusicSynth_Release(p) (p)->lpVtbl->Release(p)
110/*** IDirectMusicSynth methods ***/
111#define IDirectMusicSynth_Open(p,a) (p)->lpVtbl->Open(p,a)
112#define IDirectMusicSynth_Close(p) (p)->lpVtbl->Close(p)
113#define IDirectMusicSynth_SetNumChannelGroups(p,a) (p)->lpVtbl->SetNumChannelGroups(p,a)
114#define IDirectMusicSynth_Download(p,a,b,c) (p)->lpVtbl->Download(p,a,b,c)
115#define IDirectMusicSynth_Unload(p,a,b,c) (p)->lpVtbl->Unload(p,a,b,c)
116#define IDirectMusicSynth_PlayBuffer(p,a,b,c) (p)->lpVtbl->PlayBuffer(p,a,b,c)
117#define IDirectMusicSynth_GetRunningStats(p,a) (p)->lpVtbl->GetRunningStats(p,a)
118#define IDirectMusicSynth_GetPortCaps(p,a) (p)->lpVtbl->GetPortCaps(p,a)
119#define IDirectMusicSynth_SetMasterClock(p,a) (p)->lpVtbl->SetMasterClock(p,a)
120#define IDirectMusicSynth_GetLatencyClock(p,a) (p)->lpVtbl->GetLatencyClock(p,a)
121#define IDirectMusicSynth_Activate(p,a) (p)->lpVtbl->Activate(p,a)
122#define IDirectMusicSynth_SetSynthSink(p,a) (p)->lpVtbl->SetSynthSink(p,a)
123#define IDirectMusicSynth_Render(p,a,b,c) (p)->lpVtbl->Render(p,a,b,c)
124#define IDirectMusicSynth_SetChannelPriority(p,a,b,c) (p)->lpVtbl->SetChannelPriority(p,a,b,c)
125#define IDirectMusicSynth_GetChannelPriority(p,a,b,c) (p)->lpVtbl->GetChannelPriority(p,a,b,c)
126#define IDirectMusicSynth_GetFormat(p,a,b) (p)->lpVtbl->GetFormat(p,a,b)
127#define IDirectMusicSynth_GetAppend(p,a) (p)->lpVtbl->GetAppend(p,a)
128#endif
129
130
131/*****************************************************************************
132 * IDirectMusicSynth8 interface
133 */
134#define INTERFACE IDirectMusicSynth8
135DECLARE_INTERFACE_(IDirectMusicSynth8,IDirectMusicSynth)
136{
137 /*** IUnknown methods ***/
138 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
139 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
140 STDMETHOD_(ULONG,Release)(THIS) PURE;
141 /*** IDirectMusicSynth methods ***/
142 STDMETHOD(Open)(THIS_ LPDMUS_PORTPARAMS pPortParams) PURE;
143 STDMETHOD(Close)(THIS) PURE;
144 STDMETHOD(SetNumChannelGroups)(THIS_ DWORD dwGroups) PURE;
145 STDMETHOD(Download)(THIS_ LPHANDLE phDownload, LPVOID pvData, LPBOOL pbFree) PURE;
146 STDMETHOD(Unload)(THIS_ HANDLE hDownload, HRESULT (CALLBACK* lpFreeHandle)(HANDLE,HANDLE), HANDLE hUserData) PURE;
147 STDMETHOD(PlayBuffer)(THIS_ REFERENCE_TIME rt, LPBYTE pbBuffer, DWORD cbBuffer) PURE;
148 STDMETHOD(GetRunningStats)(THIS_ LPDMUS_SYNTHSTATS pStats) PURE;
149 STDMETHOD(GetPortCaps)(THIS_ LPDMUS_PORTCAPS pCaps) PURE;
150 STDMETHOD(SetMasterClock)(THIS_ IReferenceClock *pClock) PURE;
151 STDMETHOD(GetLatencyClock)(THIS_ IReferenceClock **ppClock) PURE;
152 STDMETHOD(Activate)(THIS_ WINBOOL fEnable) PURE;
153 STDMETHOD(SetSynthSink)(THIS_ struct IDirectMusicSynthSink *pSynthSink) PURE;
154 STDMETHOD(Render)(THIS_ short *pBuffer, DWORD dwLength, LONGLONG llPosition) PURE;
155 STDMETHOD(SetChannelPriority)(THIS_ DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority) PURE;
156 STDMETHOD(GetChannelPriority)(THIS_ DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority) PURE;
157 STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSiz) PURE;
158 STDMETHOD(GetAppend)(THIS_ DWORD *pdwAppend) PURE;
159 /*** IDirectMusicSynth8 methods ***/
160 STDMETHOD(PlayVoice)(THIS_ REFERENCE_TIME rt, DWORD dwVoiceId, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwDLId, LONG prPitch, LONG vrVolume, SAMPLE_TIME stVoiceStart, SAMPLE_TIME stLoopStart, SAMPLE_TIME stLoopEnd) PURE;
161 STDMETHOD(StopVoice)(THIS_ REFERENCE_TIME rt, DWORD dwVoiceId) PURE;
162 STDMETHOD(GetVoiceState)(THIS_ DWORD dwVoice[], DWORD cbVoice, DMUS_VOICE_STATE dwVoiceState[]) PURE;
163 STDMETHOD(Refresh)(THIS_ DWORD dwDownloadID, DWORD dwFlags) PURE;
164 STDMETHOD(AssignChannelToBuses)(THIS_ DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwBuses, DWORD cBuses) PURE;
165};
166#undef INTERFACE
167
168#if !defined(__cplusplus) || defined(CINTERFACE)
169/*** IUnknown methods ***/
170#define IDirectMusicSynth8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
171#define IDirectMusicSynth8_AddRef(p) (p)->lpVtbl->AddRef(p)
172#define IDirectMusicSynth8_Release(p) (p)->lpVtbl->Release(p)
173/*** IDirectMusicSynth methods ***/
174#define IDirectMusicSynth8_Open(p,a) (p)->lpVtbl->Open(p,a)
175#define IDirectMusicSynth8_Close(p) (p)->lpVtbl->Close(p)
176#define IDirectMusicSynth8_SetNumChannelGroups(p,a) (p)->lpVtbl->SetNumChannelGroups(p,a)
177#define IDirectMusicSynth8_Download(p,a,b,c) (p)->lpVtbl->Download(p,a,b,c)
178#define IDirectMusicSynth8_Unload(p,a,b,c) (p)->lpVtbl->Unload(p,a,b,c)
179#define IDirectMusicSynth8_PlayBuffer(p,a,b,c) (p)->lpVtbl->PlayBuffer(p,a,b,c)
180#define IDirectMusicSynth8_GetRunningStats(p,a) (p)->lpVtbl->GetRunningStats(p,a)
181#define IDirectMusicSynth8_GetPortCaps(p,a) (p)->lpVtbl->GetPortCaps(p,a)
182#define IDirectMusicSynth8_SetMasterClock(p,a) (p)->lpVtbl->SetMasterClock(p,a)
183#define IDirectMusicSynth8_GetLatencyClock(p,a) (p)->lpVtbl->GetLatencyClock(p,a)
184#define IDirectMusicSynth8_Activate(p,a) (p)->lpVtbl->Activate(p,a)
185#define IDirectMusicSynth8_SetSynthSink(p,a) (p)->lpVtbl->SetSynthSink(p,a)
186#define IDirectMusicSynth8_Render(p,a,b,c) (p)->lpVtbl->Render(p,a,b,c)
187#define IDirectMusicSynth8_SetChannelPriority(p,a,b,c) (p)->lpVtbl->SetChannelPriority(p,a,b,c)
188#define IDirectMusicSynth8_GetChannelPriority(p,a,b,c) (p)->lpVtbl->GetChannelPriority(p,a,b,c)
189#define IDirectMusicSynth8_GetFormat(p,a,b) (p)->lpVtbl->GetFormat(p,a,b)
190#define IDirectMusicSynth8_GetAppend(p,a) (p)->lpVtbl->GetAppend(p,a)
191/*** IDirectMusicSynth8 methods ***/
192#define IDirectMusicSynth8_PlayVoice(p,a,b,c,d,e,f,g,h,i,j) (p)->lpVtbl->PlayVoice(p,a,b,c,d,e,f,g,h,i,j)
193#define IDirectMusicSynth8_StopVoice(p,a,b) (p)->lpVtbl->StopVoice(p,a,b)
194#define IDirectMusicSynth8_GetVoiceState(p,a,b,c) (p)->lpVtbl->GetVoiceState(p,a,b,c)
195#define IDirectMusicSynth8_Refresh(p,a,b) (p)->lpVtbl->Refresh(p,a,b)
196#define IDirectMusicSynth8_AssignChannelToBuses(p,a,b,c,d) (p)->lpVtbl->AssignChannelToBuses(p,a,b,c,d)
197#endif
198
199
200/*****************************************************************************
201 * IDirectMusicSynthSink interface
202 */
203#define INTERFACE IDirectMusicSynthSink
204DECLARE_INTERFACE_(IDirectMusicSynthSink,IUnknown)
205{
206 /*** IUnknown methods ***/
207 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
208 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
209 STDMETHOD_(ULONG,Release)(THIS) PURE;
210 /*** IDirectMusicSynthSink methods ***/
211 STDMETHOD(Init)(THIS_ IDirectMusicSynth *pSynth) PURE;
212 STDMETHOD(SetMasterClock)(THIS_ IReferenceClock *pClock) PURE;
213 STDMETHOD(GetLatencyClock)(THIS_ IReferenceClock **ppClock) PURE;
214 STDMETHOD(Activate)(THIS_ WINBOOL fEnable) PURE;
215 STDMETHOD(SampleToRefTime)(THIS_ LONGLONG llSampleTime, REFERENCE_TIME *prfTime) PURE;
216 STDMETHOD(RefTimeToSample)(THIS_ REFERENCE_TIME rfTime, LONGLONG *pllSampleTime) PURE;
217 STDMETHOD(SetDirectSound)(THIS_ LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer) PURE;
218 STDMETHOD(GetDesiredBufferSize)(THIS_ LPDWORD pdwBufferSizeInSamples) PURE;
219};
220#undef INTERFACE
221
222#if !defined(__cplusplus) || defined(CINTERFACE)
223/*** IUnknown methods ***/
224#define IDirectMusicSynthSink_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
225#define IDirectMusicSynthSink_AddRef(p) (p)->lpVtbl->AddRef(p)
226#define IDirectMusicSynthSink_Release(p) (p)->lpVtbl->Release(p)
227/*** IDirectMusicSynth methods ***/
228#define IDirectMusicSynthSink_Init(p,a) (p)->lpVtbl->Init(p,a)
229#define IDirectMusicSynthSink_SetMasterClock(p,a) (p)->lpVtbl->SetMasterClock(p,a)
230#define IDirectMusicSynthSink_GetLatencyClock(p,a) (p)->lpVtbl->GetLatencyClock(p,a)
231#define IDirectMusicSynthSink_Activate(p,a) (p)->lpVtbl->Activate(p,a)
232#define IDirectMusicSynthSink_SampleToRefTime(p,a,b) (p)->lpVtbl->SampleToRefTime(p,a,b)
233#define IDirectMusicSynthSink_RefTimeToSample(p,a,b) (p)->lpVtbl->RefTimeToSample(p,a,b)
234#define IDirectMusicSynthSink_SetDirectSound(p,a,b) (p)->lpVtbl->SetDirectSound(p,a,b)
235#define IDirectMusicSynthSink_GetDesiredBufferSize(p,a) (p)->lpVtbl->GetDesiredBufferSize(p,a)
236#endif
237
238#endif /* __WINE_DMUSIC_SOFTWARESYNTH_H */
Note: See TracBrowser for help on using the repository browser.