ReactOS 0.4.17-dev-966-gf06eace
dmusic_private.h
Go to the documentation of this file.
1/*
2 * DirectMusic Private Include
3 *
4 * Copyright (C) 2003-2004 Rok Mandeljc
5 * Copyright (C) 2012 Christian Costa
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_PRIVATE_H
23#define __WINE_DMUSIC_PRIVATE_H
24
25#include <stdarg.h>
26
27#define COBJMACROS
28#include "windef.h"
29#include "winbase.h"
30#include "winnt.h"
31#include "wingdi.h"
32#include "winuser.h"
33
34#include "wine/debug.h"
35#include "wine/list.h"
36#include "winreg.h"
37#include "objbase.h"
38
39#include "dmusici.h"
40#include "dmusicf.h"
41#include "dmusics.h"
42#include "dmksctrl.h"
43
44#include "dmobject.h"
45#include "dmusic_wave.h"
46
47/*****************************************************************************
48 * Interfaces
49 */
53
54/*****************************************************************************
55 * Some stuff to make my life easier :=)
56 */
57
58/* some sort of aux. midi channel: big fake at the moment; accepts only priority
59 changes... more coming soon */
63
64/* some sort of aux. channel group: collection of 16 midi channels */
66 DMUSIC_PRIVATE_MCHANNEL channel[16]; /* 16 channels in a group */
68
69typedef struct port_info {
72 DMUS_PORTCAPS *port_caps, IDirectMusicPort **port);
75
76/*****************************************************************************
77 * ClassFactory
78 */
79
80struct collection;
83extern HRESULT collection_get_wave(struct collection *collection, DWORD index, IDirectMusicObject **out);
84
85/* CLSID */
86extern HRESULT music_create(IUnknown **ret_iface);
87extern HRESULT collection_create(IUnknown **ret_iface);
88
89/* Internal */
91extern HRESULT DMUSIC_CreateReferenceClockImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
92
93extern HRESULT download_create(DWORD size, IDirectMusicDownload **ret_iface);
94
96 struct collection *collection, DMUS_OBJECTDESC *desc, IDirectMusicInstrument **ret_iface);
98 struct collection *collection, DMUS_OBJECTDESC *desc, IDirectMusicInstrument **ret_iface);
99extern HRESULT instrument_download_to_port(IDirectMusicInstrument *iface, IDirectMusicPortDownload *port,
100 IDirectMusicDownloadedInstrument **downloaded);
101extern HRESULT instrument_unload_from_port(IDirectMusicDownloadedInstrument *iface, IDirectMusicPortDownload *port);
102
103/*****************************************************************************
104 * IDirectMusic8Impl implementation structure
105 */
107 IDirectMusic8 IDirectMusic8_iface;
109 IDirectSound *dsound;
111 IDirectMusicPort **ports;
115};
116
117/*****************************************************************************
118 * IDirectMusicBufferImpl implementation structure
119 */
121 /* IUnknown fields */
122 IDirectMusicBuffer IDirectMusicBuffer_iface;
124
125 /* IDirectMusicBufferImpl fields */
131};
132
135 DMUS_PORTCAPS *port_caps, IDirectMusicPort **port);
137 DMUS_PORTCAPS *port_caps, IDirectMusicPort **port);
139 DMUS_PORTCAPS *port_caps, IDirectMusicPort **port);
140
141/*****************************************************************************
142 * IReferenceClockImpl implementation structure
143 */
145 /* IUnknown fields */
148
149 /* IReferenceClockImpl fields */
152};
153
154typedef struct _DMUS_PRIVATE_POOLCUE {
155 struct list entry; /* for listing elements */
157
158/*****************************************************************************
159 * Misc.
160 */
161void dmusic_remove_port(IDirectMusic8Impl *dmusic, IDirectMusicPort *port);
162
163/* used for generic dumping (copied from ddraw) */
164typedef struct {
165 DWORD val;
166 const char* name;
167} flag_info;
168
169#define FE(x) { x, #x }
170
171/* dwPatch from MIDILOCALE */
172extern DWORD MIDILOCALE2Patch (const MIDILOCALE *pLocale);
173/* MIDILOCALE from dwPatch */
174extern void Patch2MIDILOCALE (DWORD dwPatch, LPMIDILOCALE pLocale);
175
176/* Dump whole DMUS_PORTPARAMS struct */
178
179#endif /* __WINE_DMUSIC_PRIVATE_H */
Definition: list.h:39
static LPVOID LPUNKNOWN
Definition: dinput.c:53
USHORT port
Definition: uri.c:210
void Patch2MIDILOCALE(DWORD dwPatch, LPMIDILOCALE pLocale)
Definition: dmusic_main.c:160
HRESULT collection_get_wave(struct collection *collection, DWORD index, IDirectMusicObject **out)
Definition: collection.c:81
HRESULT instrument_unload_from_port(IDirectMusicDownloadedInstrument *iface, IDirectMusicPortDownload *port)
Definition: instrument.c:865
struct DMUSIC_PRIVATE_CHANNEL_GROUP_ * LPDMUSIC_PRIVATE_CHANNEL_GROUP
struct DMUSIC_PRIVATE_CHANNEL_GROUP_ DMUSIC_PRIVATE_CHANNEL_GROUP
HRESULT synth_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *port_params, DMUS_PORTCAPS *port_caps, IDirectMusicPort **port)
Definition: port.c:686
struct _DMUS_PRIVATE_POOLCUE * LPDMUS_PRIVATE_POOLCUE
void collection_internal_addref(struct collection *collection)
Definition: collection.c:66
HRESULT DMUSIC_CreateDirectMusicBufferImpl(LPDMUS_BUFFERDESC desc, LPVOID *ret_iface)
Definition: buffer.c:293
HRESULT midi_in_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *port_params, DMUS_PORTCAPS *port_caps, IDirectMusicPort **port)
Definition: port.c:1072
HRESULT midi_out_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *port_params, DMUS_PORTCAPS *port_caps, IDirectMusicPort **port)
Definition: port.c:1064
HRESULT collection_create(IUnknown **ret_iface)
Definition: collection.c:749
DWORD MIDILOCALE2Patch(const MIDILOCALE *pLocale)
Definition: dmusic_main.c:150
HRESULT music_create(IUnknown **ret_iface)
Definition: dmusic.c:579
struct _DMUS_PRIVATE_POOLCUE DMUS_PRIVATE_POOLCUE
HRESULT instrument_download_to_port(IDirectMusicInstrument *iface, IDirectMusicPortDownload *port, IDirectMusicDownloadedInstrument **downloaded)
Definition: instrument.c:752
void dump_DMUS_PORTPARAMS(LPDMUS_PORTPARAMS params)
Definition: dmusic_main.c:203
struct DMUSIC_PRIVATE_MCHANNEL_ * LPDMUSIC_PRIVATE_MCHANNEL
void dmusic_remove_port(IDirectMusic8Impl *dmusic, IDirectMusicPort *port)
Definition: dmusic.c:291
void collection_internal_release(struct collection *collection)
Definition: collection.c:72
HRESULT DMUSIC_CreateReferenceClockImpl(LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter)
Definition: clock.c:116
struct DMUSIC_PRIVATE_MCHANNEL_ DMUSIC_PRIVATE_MCHANNEL
HRESULT instrument_create_from_chunk(IStream *stream, struct chunk_entry *parent, struct collection *collection, DMUS_OBJECTDESC *desc, IDirectMusicInstrument **ret_iface)
Definition: instrument.c:417
HRESULT instrument_create_from_soundfont(struct soundfont *soundfont, UINT index, struct collection *collection, DMUS_OBJECTDESC *desc, IDirectMusicInstrument **ret_iface)
Definition: instrument.c:620
HRESULT download_create(DWORD size, IDirectMusicDownload **ret_iface)
Definition: download.c:106
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
r parent
Definition: btrfs.c:3010
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
GLuint index
Definition: glext.h:6031
GLenum const GLfloat * params
Definition: glext.h:5645
GLuint GLfloat * val
Definition: glext.h:7180
unsigned int UINT
Definition: sysinfo.c:13
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
long LONG
Definition: pedump.c:60
IReferenceClock * master_clock
IDirectMusicPort ** ports
IDirectSound * dsound
IDirectMusic8 IDirectMusic8_iface
port_info * system_ports
IDirectMusicBuffer IDirectMusicBuffer_iface
REFERENCE_TIME start_time
DMUS_CLOCKINFO pClockInfo
REFERENCE_TIME rtTime
IReferenceClock IReferenceClock_iface
Definition: dmobject.h:26
Definition: name.c:39
ULONG device
DMUS_PORTCAPS caps
HRESULT(* create)(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *port_params, DMUS_PORTCAPS *port_caps, IDirectMusicPort **port)
Definition: parse.h:23
unsigned char * LPBYTE
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
#define HRESULT
Definition: msvc.h:7