ReactOS  0.4.14-dev-77-gd9e7c48
dmusic_main.c File Reference
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winnt.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "objbase.h"
#include "rpcproxy.h"
#include "initguid.h"
#include "dmusici.h"
#include "dmusic_private.h"
Include dependency graph for dmusic_main.c:

Go to the source code of this file.

Classes

struct  IClassFactoryImpl
 

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (dmusic)
 
static IClassFactoryImplimpl_from_IClassFactory (IClassFactory *iface)
 
static HRESULT WINAPI ClassFactory_QueryInterface (IClassFactory *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ClassFactory_AddRef (IClassFactory *iface)
 
static ULONG WINAPI ClassFactory_Release (IClassFactory *iface)
 
static HRESULT WINAPI ClassFactory_CreateInstance (IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppv)
 
static HRESULT WINAPI ClassFactory_LockServer (IClassFactory *iface, BOOL dolock)
 
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 
HRESULT WINAPI DllCanUnloadNow (void)
 
HRESULT WINAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 
HRESULT WINAPI DllRegisterServer (void)
 
HRESULT WINAPI DllUnregisterServer (void)
 
DWORD MIDILOCALE2Patch (const MIDILOCALE *pLocale)
 
void Patch2MIDILOCALE (DWORD dwPatch, LPMIDILOCALE pLocale)
 
int even_or_odd (DWORD number)
 
const chardebugstr_fourcc (DWORD fourcc)
 
static const chardebugstr_dmversion (const DMUS_VERSION *version)
 
const chardebugstr_dmguid (const GUID *id)
 
static const chardebugstr_flags (DWORD flags, const flag_info *names, size_t num_names)
 
static const chardebugstr_DMUS_OBJ_FLAGS (DWORD flagmask)
 
void dump_DMUS_OBJECTDESC (LPDMUS_OBJECTDESC desc)
 
static const chardebugstr_DMUS_PORTPARAMS_FLAGS (DWORD flagmask)
 
void dump_DMUS_PORTPARAMS (LPDMUS_PORTPARAMS params)
 

Variables

typedef threading
 
static HINSTANCE instance
 
LONG DMUSIC_refCount = 0
 
static const IClassFactoryVtbl classfactory_vtbl
 
static IClassFactoryImpl DirectMusic_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicImpl}
 
static IClassFactoryImpl Collection_CF
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 26 of file dmusic_main.c.

Function Documentation

◆ ClassFactory_AddRef()

static ULONG WINAPI ClassFactory_AddRef ( IClassFactory iface)
static

Definition at line 79 of file dmusic_main.c.

80 {
82 
83  return 2; /* non-heap based object */
84 }
static void DMUSIC_LockModule(void)

◆ ClassFactory_CreateInstance()

static HRESULT WINAPI ClassFactory_CreateInstance ( IClassFactory iface,
IUnknown pUnkOuter,
REFIID  riid,
void **  ppv 
)
static

Definition at line 93 of file dmusic_main.c.

95 {
97 
98  TRACE ("(%p, %s, %p)\n", pUnkOuter, debugstr_dmguid(riid), ppv);
99 
100  return This->fnCreateInstance(riid, ppv, pUnkOuter);
101 }
const char * debugstr_dmguid(const GUID *id)
Definition: dmusic_main.c:237
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static IClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
Definition: dmusic_main.c:54
#define TRACE(s)
Definition: solgame.cpp:4

◆ ClassFactory_LockServer()

static HRESULT WINAPI ClassFactory_LockServer ( IClassFactory iface,
BOOL  dolock 
)
static

Definition at line 103 of file dmusic_main.c.

104 {
105  TRACE("(%d)\n", dolock);
106 
107  if (dolock)
109  else
111 
112  return S_OK;
113 }
static void DMUSIC_UnlockModule(void)
static void DMUSIC_LockModule(void)
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ ClassFactory_QueryInterface()

static HRESULT WINAPI ClassFactory_QueryInterface ( IClassFactory iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 59 of file dmusic_main.c.

60 {
61  if (ppv == NULL)
62  return E_POINTER;
63 
65  TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv);
67  TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv);
68  else {
69  FIXME("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
70  *ppv = NULL;
71  return E_NOINTERFACE;
72  }
73 
74  *ppv = iface;
75  IUnknown_AddRef((IUnknown*)*ppv);
76  return S_OK;
77 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
#define E_POINTER
Definition: winerror.h:2365
const GUID IID_IClassFactory

◆ ClassFactory_Release()

static ULONG WINAPI ClassFactory_Release ( IClassFactory iface)
static

Definition at line 86 of file dmusic_main.c.

87 {
89 
90  return 1; /* non-heap based object */
91 }
static void DMUSIC_UnlockModule(void)

◆ debugstr_dmguid()

const char* debugstr_dmguid ( const GUID id)

Definition at line 237 of file dmusic_main.c.

237  {
238  static const guid_info guids[] = {
239  /* CLSIDs */
240  GE(CLSID_AudioVBScript),
241  GE(CLSID_DirectMusic),
242  GE(CLSID_DirectMusicAudioPathConfig),
243  GE(CLSID_DirectMusicAuditionTrack),
244  GE(CLSID_DirectMusicBand),
245  GE(CLSID_DirectMusicBandTrack),
246  GE(CLSID_DirectMusicChordMapTrack),
247  GE(CLSID_DirectMusicChordMap),
248  GE(CLSID_DirectMusicChordTrack),
249  GE(CLSID_DirectMusicCollection),
250  GE(CLSID_DirectMusicCommandTrack),
251  GE(CLSID_DirectMusicComposer),
252  GE(CLSID_DirectMusicContainer),
253  GE(CLSID_DirectMusicGraph),
254  GE(CLSID_DirectMusicLoader),
255  GE(CLSID_DirectMusicLyricsTrack),
256  GE(CLSID_DirectMusicMarkerTrack),
257  GE(CLSID_DirectMusicMelodyFormulationTrack),
258  GE(CLSID_DirectMusicMotifTrack),
259  GE(CLSID_DirectMusicMuteTrack),
260  GE(CLSID_DirectMusicParamControlTrack),
261  GE(CLSID_DirectMusicPatternTrack),
262  GE(CLSID_DirectMusicPerformance),
263  GE(CLSID_DirectMusicScript),
264  GE(CLSID_DirectMusicScriptAutoImpSegment),
265  GE(CLSID_DirectMusicScriptAutoImpPerformance),
266  GE(CLSID_DirectMusicScriptAutoImpSegmentState),
267  GE(CLSID_DirectMusicScriptAutoImpAudioPathConfig),
268  GE(CLSID_DirectMusicScriptAutoImpAudioPath),
269  GE(CLSID_DirectMusicScriptAutoImpSong),
270  GE(CLSID_DirectMusicScriptSourceCodeLoader),
271  GE(CLSID_DirectMusicScriptTrack),
272  GE(CLSID_DirectMusicSection),
273  GE(CLSID_DirectMusicSegment),
274  GE(CLSID_DirectMusicSegmentState),
275  GE(CLSID_DirectMusicSegmentTriggerTrack),
276  GE(CLSID_DirectMusicSegTriggerTrack),
277  GE(CLSID_DirectMusicSeqTrack),
278  GE(CLSID_DirectMusicSignPostTrack),
279  GE(CLSID_DirectMusicSong),
280  GE(CLSID_DirectMusicStyle),
281  GE(CLSID_DirectMusicStyleTrack),
282  GE(CLSID_DirectMusicSynth),
283  GE(CLSID_DirectMusicSynthSink),
284  GE(CLSID_DirectMusicSysExTrack),
285  GE(CLSID_DirectMusicTemplate),
286  GE(CLSID_DirectMusicTempoTrack),
287  GE(CLSID_DirectMusicTimeSigTrack),
288  GE(CLSID_DirectMusicWaveTrack),
289  GE(CLSID_DirectSoundWave),
290  /* IIDs */
291  GE(IID_IDirectMusic),
292  GE(IID_IDirectMusic2),
293  GE(IID_IDirectMusic8),
294  GE(IID_IDirectMusicAudioPath),
295  GE(IID_IDirectMusicBand),
296  GE(IID_IDirectMusicBuffer),
297  GE(IID_IDirectMusicChordMap),
298  GE(IID_IDirectMusicCollection),
299  GE(IID_IDirectMusicComposer),
300  GE(IID_IDirectMusicContainer),
301  GE(IID_IDirectMusicDownload),
302  GE(IID_IDirectMusicDownloadedInstrument),
303  GE(IID_IDirectMusicGetLoader),
304  GE(IID_IDirectMusicGraph),
305  GE(IID_IDirectMusicInstrument),
306  GE(IID_IDirectMusicLoader),
307  GE(IID_IDirectMusicLoader8),
308  GE(IID_IDirectMusicObject),
309  GE(IID_IDirectMusicPatternTrack),
310  GE(IID_IDirectMusicPerformance),
311  GE(IID_IDirectMusicPerformance2),
312  GE(IID_IDirectMusicPerformance8),
313  GE(IID_IDirectMusicPort),
314  GE(IID_IDirectMusicPortDownload),
315  GE(IID_IDirectMusicScript),
316  GE(IID_IDirectMusicSegment),
317  GE(IID_IDirectMusicSegment2),
318  GE(IID_IDirectMusicSegment8),
319  GE(IID_IDirectMusicSegmentState),
320  GE(IID_IDirectMusicSegmentState8),
321  GE(IID_IDirectMusicStyle),
322  GE(IID_IDirectMusicStyle8),
323  GE(IID_IDirectMusicSynth),
324  GE(IID_IDirectMusicSynth8),
325  GE(IID_IDirectMusicSynthSink),
326  GE(IID_IDirectMusicThru),
327  GE(IID_IDirectMusicTool),
328  GE(IID_IDirectMusicTool8),
329  GE(IID_IDirectMusicTrack),
330  GE(IID_IDirectMusicTrack8),
331  GE(IID_IUnknown),
333  GE(IID_IStream),
335  /* GUIDs */
336  GE(GUID_DirectMusicAllTypes),
337  GE(GUID_NOTIFICATION_CHORD),
338  GE(GUID_NOTIFICATION_COMMAND),
339  GE(GUID_NOTIFICATION_MEASUREANDBEAT),
340  GE(GUID_NOTIFICATION_PERFORMANCE),
341  GE(GUID_NOTIFICATION_RECOMPOSE),
342  GE(GUID_NOTIFICATION_SEGMENT),
343  GE(GUID_BandParam),
344  GE(GUID_ChordParam),
345  GE(GUID_CommandParam),
346  GE(GUID_CommandParam2),
347  GE(GUID_CommandParamNext),
348  GE(GUID_IDirectMusicBand),
349  GE(GUID_IDirectMusicChordMap),
350  GE(GUID_IDirectMusicStyle),
351  GE(GUID_MuteParam),
352  GE(GUID_Play_Marker),
353  GE(GUID_RhythmParam),
354  GE(GUID_TempoParam),
355  GE(GUID_TimeSignature),
356  GE(GUID_Valid_Start_Time),
357  GE(GUID_Clear_All_Bands),
358  GE(GUID_ConnectToDLSCollection),
359  GE(GUID_Disable_Auto_Download),
360  GE(GUID_DisableTempo),
361  GE(GUID_DisableTimeSig),
362  GE(GUID_Download),
363  GE(GUID_DownloadToAudioPath),
364  GE(GUID_Enable_Auto_Download),
365  GE(GUID_EnableTempo),
366  GE(GUID_EnableTimeSig),
368  GE(GUID_SeedVariations),
369  GE(GUID_StandardMIDIFile),
370  GE(GUID_Unload),
371  GE(GUID_UnloadFromAudioPath),
372  GE(GUID_Variations),
373  GE(GUID_PerfMasterTempo),
374  GE(GUID_PerfMasterVolume),
375  GE(GUID_PerfMasterGrooveLevel),
376  GE(GUID_PerfAutoDownload),
377  GE(GUID_DefaultGMCollection),
378  GE(GUID_Synth_Default),
379  GE(GUID_Buffer_Reverb),
380  GE(GUID_Buffer_EnvReverb),
381  GE(GUID_Buffer_Stereo),
382  GE(GUID_Buffer_3D_Dry),
383  GE(GUID_Buffer_Mono),
384  GE(GUID_DMUS_PROP_GM_Hardware),
385  GE(GUID_DMUS_PROP_GS_Capable),
386  GE(GUID_DMUS_PROP_GS_Hardware),
387  GE(GUID_DMUS_PROP_DLS1),
388  GE(GUID_DMUS_PROP_DLS2),
389  GE(GUID_DMUS_PROP_Effects),
390  GE(GUID_DMUS_PROP_INSTRUMENT2),
391  GE(GUID_DMUS_PROP_LegacyCaps),
392  GE(GUID_DMUS_PROP_MemorySize),
393  GE(GUID_DMUS_PROP_SampleMemorySize),
394  GE(GUID_DMUS_PROP_SamplePlaybackRate),
395  GE(GUID_DMUS_PROP_SetSynthSink),
396  GE(GUID_DMUS_PROP_SinkUsesDSound),
397  GE(GUID_DMUS_PROP_SynthSink_DSOUND),
398  GE(GUID_DMUS_PROP_SynthSink_WAVE),
399  GE(GUID_DMUS_PROP_Volume),
400  GE(GUID_DMUS_PROP_WavesReverb),
401  GE(GUID_DMUS_PROP_WriteLatency),
402  GE(GUID_DMUS_PROP_WritePeriod),
403  GE(GUID_DMUS_PROP_XG_Capable),
404  GE(GUID_DMUS_PROP_XG_Hardware)
405  };
406 
407  unsigned int i;
408 
409  if (!id) return "(null)";
410 
411  for (i = 0; i < ARRAY_SIZE(guids); i++) {
412  if (IsEqualGUID(id, guids[i].guid))
413  return guids[i].name;
414  }
415  /* if we didn't find it, act like standard debugstr_guid */
416  return debugstr_guid(id);
417 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const GUID * guid
#define GUID_IgnoreBankSelectForGM
Definition: dmusici.h:181
#define debugstr_guid
Definition: kernel32.h:35
#define GE(x)
const GUID IID_IUnknown
const GUID IID_IPersistStream
Definition: proxy.cpp:13
#define ARRAY_SIZE(a)
Definition: main.h:24
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
Definition: name.c:36
const GUID IID_IClassFactory

Referenced by ClassFactory_CreateInstance(), DllGetClassObject(), dump_DMUS_OBJECTDESC(), IDirectMusic8Impl_CreatePort(), IDirectMusic8Impl_QueryInterface(), IDirectMusic8Impl_SetMasterClock(), IDirectMusicBufferImpl_QueryInterface(), IDirectMusicCollectionImpl_QueryInterface(), IDirectMusicDownloadedInstrumentImpl_QueryInterface(), IDirectMusicDownloadImpl_QueryInterface(), IDirectMusicInstrumentImpl_QueryInterface(), IPersistStreamImpl_Load(), IReferenceClockImpl_QueryInterface(), midi_IDirectMusicPort_QueryInterface(), SynthPortImpl_IDirectMusicPort_QueryInterface(), SynthPortImpl_IDirectMusicPortDownload_QueryInterface(), and SynthPortImpl_IDirectMusicThru_QueryInterface().

◆ debugstr_DMUS_OBJ_FLAGS()

static const char* debugstr_DMUS_OBJ_FLAGS ( DWORD  flagmask)
static

Definition at line 440 of file dmusic_main.c.

440  {
441  static const flag_info flags[] = {
444  FE(DMUS_OBJ_NAME),
448  FE(DMUS_OBJ_URL),
450  FE(DMUS_OBJ_DATE),
454  };
455  return debugstr_flags(flagmask, flags, ARRAY_SIZE(flags));
456 }
#define DMUS_OBJ_NAME
Definition: dmusici.h:267
#define DMUS_OBJ_LOADED
Definition: dmusici.h:274
#define DMUS_OBJ_FILENAME
Definition: dmusici.h:269
#define DMUS_OBJ_URL
Definition: dmusici.h:271
#define FE(x)
#define DMUS_OBJ_OBJECT
Definition: dmusici.h:265
GLbitfield flags
Definition: glext.h:7161
#define DMUS_OBJ_MEMORY
Definition: dmusici.h:275
#define DMUS_OBJ_FULLPATH
Definition: dmusici.h:270
#define DMUS_OBJ_DATE
Definition: dmusici.h:273
#define DMUS_OBJ_CATEGORY
Definition: dmusici.h:268
static const char * debugstr_flags(DWORD flags, const flag_info *names, size_t num_names)
Definition: dmusic_main.c:420
#define ARRAY_SIZE(a)
Definition: main.h:24
#define DMUS_OBJ_VERSION
Definition: dmusici.h:272
#define DMUS_OBJ_CLASS
Definition: dmusici.h:266
#define DMUS_OBJ_STREAM
Definition: dmusici.h:276

Referenced by dump_DMUS_OBJECTDESC().

◆ debugstr_DMUS_PORTPARAMS_FLAGS()

static const char* debugstr_DMUS_PORTPARAMS_FLAGS ( DWORD  flagmask)
static

Definition at line 477 of file dmusic_main.c.

478 {
479  static const flag_info flags[] = {
486  };
487  return debugstr_flags(flagmask, flags, ARRAY_SIZE(flags));
488 }
#define DMUS_PORTPARAMS_EFFECTS
Definition: dmusicc.h:208
#define DMUS_PORTPARAMS_CHANNELGROUPS
Definition: dmusicc.h:205
#define DMUS_PORTPARAMS_AUDIOCHANNELS
Definition: dmusicc.h:206
#define DMUS_PORTPARAMS_VOICES
Definition: dmusicc.h:204
#define FE(x)
#define DMUS_PORTPARAMS_SHARE
Definition: dmusicc.h:209
GLbitfield flags
Definition: glext.h:7161
static const char * debugstr_flags(DWORD flags, const flag_info *names, size_t num_names)
Definition: dmusic_main.c:420
#define ARRAY_SIZE(a)
Definition: main.h:24
#define DMUS_PORTPARAMS_SAMPLERATE
Definition: dmusicc.h:207

Referenced by dump_DMUS_PORTPARAMS().

◆ debugstr_dmversion()

static const char* debugstr_dmversion ( const DMUS_VERSION version)
static

Definition at line 229 of file dmusic_main.c.

229  {
230  if (!version) return "'null'";
231  return wine_dbg_sprintf ("\'%i,%i,%i,%i\'",
232  (int)((version->dwVersionMS & 0xFFFF0000) >> 8), (int)(version->dwVersionMS & 0x0000FFFF),
233  (int)((version->dwVersionLS & 0xFFFF0000) >> 8), (int)(version->dwVersionLS & 0x0000FFFF));
234 }
const char * wine_dbg_sprintf(const char *format,...)
Definition: compat.c:271
static const WCHAR version[]
Definition: asmname.c:64

Referenced by dump_DMUS_OBJECTDESC().

◆ debugstr_flags()

static const char* debugstr_flags ( DWORD  flags,
const flag_info names,
size_t  num_names 
)
static

Definition at line 420 of file dmusic_main.c.

420  {
421  char buffer[128] = "", *ptr = &buffer[0];
422  unsigned int i;
423  int size = sizeof(buffer);
424 
425  for (i=0; i < num_names; i++)
426  {
427  if ((flags & names[i].val) || /* standard flag*/
428  ((!flags) && (!names[i].val))) { /* zero value only */
429  int cnt = snprintf(ptr, size, "%s ", names[i].name);
430  if (cnt < 0 || cnt >= size) break;
431  size -= cnt;
432  ptr += cnt;
433  }
434  }
435 
436  return wine_dbg_sprintf("%s", buffer);
437 }
#define snprintf
Definition: wintirpc.h:48
GLuint buffer
Definition: glext.h:5915
const char * wine_dbg_sprintf(const char *format,...)
Definition: compat.c:271
GLuint GLuint * names
Definition: glext.h:11545
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static PVOID ptr
Definition: dispmode.c:27
static int num_names
Definition: apinames.c:56
GLuint GLfloat * val
Definition: glext.h:7180
GLsizeiptr size
Definition: glext.h:5919
GLbitfield flags
Definition: glext.h:7161
Definition: name.c:36

Referenced by debugstr_DMUS_OBJ_FLAGS(), and debugstr_DMUS_PORTPARAMS_FLAGS().

◆ debugstr_fourcc()

const char* debugstr_fourcc ( DWORD  fourcc)

Definition at line 221 of file dmusic_main.c.

221  {
222  if (!fourcc) return "'null'";
223  return wine_dbg_sprintf ("\'%c%c%c%c\'",
224  (char)(fourcc), (char)(fourcc >> 8),
225  (char)(fourcc >> 16), (char)(fourcc >> 24));
226 }
const char * wine_dbg_sprintf(const char *format,...)
Definition: compat.c:271

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 147 of file dmusic_main.c.

148 {
149  return DMUSIC_refCount != 0 ? S_FALSE : S_OK;
150 }
#define S_FALSE
Definition: winerror.h:2357
LONG DMUSIC_refCount
Definition: dmusic_main.c:44
#define S_OK
Definition: intsafe.h:59

◆ DllGetClassObject()

HRESULT WINAPI DllGetClassObject ( REFCLSID  rclsid,
REFIID  riid,
LPVOID ppv 
)

Definition at line 158 of file dmusic_main.c.

159 {
160  TRACE("(%s, %s, %p)\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv);
161  if (IsEqualCLSID (rclsid, &CLSID_DirectMusic) && IsEqualIID (riid, &IID_IClassFactory)) {
162  *ppv = &DirectMusic_CF;
163  IClassFactory_AddRef((IClassFactory*)*ppv);
164  return S_OK;
165  } else if (IsEqualCLSID (rclsid, &CLSID_DirectMusicCollection) && IsEqualIID (riid, &IID_IClassFactory)) {
166  *ppv = &Collection_CF;
167  IClassFactory_AddRef((IClassFactory*)*ppv);
168  return S_OK;
169  }
170 
171  WARN("(%s, %s, %p): no interface found.\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv);
173 }
const char * debugstr_dmguid(const GUID *id)
Definition: dmusic_main.c:237
static IClassFactoryImpl DirectMusic_CF
Definition: dmusic_main.c:123
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
REFIID LPVOID * ppv
Definition: atlbase.h:39
static IClassFactoryImpl Collection_CF
Definition: dmusic_main.c:124
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
const GUID IID_IClassFactory
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hinstDLL,
DWORD  fdwReason,
LPVOID  lpvReserved 
)

Definition at line 132 of file dmusic_main.c.

132  {
133  if (fdwReason == DLL_PROCESS_ATTACH) {
134  instance = hinstDLL;
135  DisableThreadLibraryCalls(hinstDLL);
136  }
137 
138  return TRUE;
139 }
static HINSTANCE instance
Definition: dmusic_main.c:43
#define TRUE
Definition: types.h:120
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:120

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 178 of file dmusic_main.c.

179 {
181 }
static HINSTANCE instance
Definition: dmusic_main.c:43
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 186 of file dmusic_main.c.

187 {
189 }
static HINSTANCE instance
Definition: dmusic_main.c:43
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110

◆ dump_DMUS_OBJECTDESC()

void dump_DMUS_OBJECTDESC ( LPDMUS_OBJECTDESC  desc)

Definition at line 459 of file dmusic_main.c.

460 {
461  TRACE("DMUS_OBJECTDESC (%p):\n", desc);
462  TRACE(" - dwSize = %d\n", desc->dwSize);
463  TRACE(" - dwValidData = %s\n", debugstr_DMUS_OBJ_FLAGS (desc->dwValidData));
464  if (desc->dwValidData & DMUS_OBJ_CLASS) TRACE(" - guidClass = %s\n", debugstr_dmguid(&desc->guidClass));
465  if (desc->dwValidData & DMUS_OBJ_OBJECT) TRACE(" - guidObject = %s\n", debugstr_guid(&desc->guidObject));
466  if (desc->dwValidData & DMUS_OBJ_DATE) TRACE(" - ftDate = FIXME\n");
467  if (desc->dwValidData & DMUS_OBJ_VERSION) TRACE(" - vVersion = %s\n", debugstr_dmversion(&desc->vVersion));
468  if (desc->dwValidData & DMUS_OBJ_NAME) TRACE(" - wszName = %s\n", debugstr_w(desc->wszName));
469  if (desc->dwValidData & DMUS_OBJ_CATEGORY) TRACE(" - wszCategory = %s\n", debugstr_w(desc->wszCategory));
470  if (desc->dwValidData & DMUS_OBJ_FILENAME) TRACE(" - wszFileName = %s\n", debugstr_w(desc->wszFileName));
471  if (desc->dwValidData & DMUS_OBJ_MEMORY) TRACE(" - llMemLength = 0x%s\n - pbMemData = %p\n",
472  wine_dbgstr_longlong(desc->llMemLength), desc->pbMemData);
473  if (desc->dwValidData & DMUS_OBJ_STREAM) TRACE(" - pStream = %p\n", desc->pStream);
474 }
const char * debugstr_dmguid(const GUID *id)
Definition: dmusic_main.c:237
#define DMUS_OBJ_NAME
Definition: dmusici.h:267
#define DMUS_OBJ_FILENAME
Definition: dmusici.h:269
static const char * debugstr_dmversion(const DMUS_VERSION *version)
Definition: dmusic_main.c:229
static const char * debugstr_DMUS_OBJ_FLAGS(DWORD flagmask)
Definition: dmusic_main.c:440
#define debugstr_w
Definition: kernel32.h:32
const struct builtin_class_descr * desc
Definition: regcontrol.c:48
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
#define DMUS_OBJ_OBJECT
Definition: dmusici.h:265
#define DMUS_OBJ_MEMORY
Definition: dmusici.h:275
#define DMUS_OBJ_DATE
Definition: dmusici.h:273
#define DMUS_OBJ_CATEGORY
Definition: dmusici.h:268
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
#define DMUS_OBJ_VERSION
Definition: dmusici.h:272
#define DMUS_OBJ_CLASS
Definition: dmusici.h:266
#define DMUS_OBJ_STREAM
Definition: dmusici.h:276

Referenced by col_IDirectMusicObject_ParseDescriptor().

◆ dump_DMUS_PORTPARAMS()

void dump_DMUS_PORTPARAMS ( LPDMUS_PORTPARAMS  params)

Definition at line 491 of file dmusic_main.c.

492 {
493  TRACE("DMUS_PORTPARAMS (%p):\n", params);
494  TRACE(" - dwSize = %d\n", params->dwSize);
495  TRACE(" - dwValidParams = %s\n", debugstr_DMUS_PORTPARAMS_FLAGS(params->dwValidParams));
496  if (params->dwValidParams & DMUS_PORTPARAMS_VOICES) TRACE(" - dwVoices = %u\n", params->dwVoices);
497  if (params->dwValidParams & DMUS_PORTPARAMS_CHANNELGROUPS) TRACE(" - dwChannelGroup = %u\n", params->dwChannelGroups);
498  if (params->dwValidParams & DMUS_PORTPARAMS_AUDIOCHANNELS) TRACE(" - dwAudioChannels = %u\n", params->dwAudioChannels);
499  if (params->dwValidParams & DMUS_PORTPARAMS_SAMPLERATE) TRACE(" - dwSampleRate = %u\n", params->dwSampleRate);
500  if (params->dwValidParams & DMUS_PORTPARAMS_EFFECTS) TRACE(" - dwEffectFlags = %x\n", params->dwEffectFlags);
501  if (params->dwValidParams & DMUS_PORTPARAMS_SHARE) TRACE(" - fShare = %u\n", params->fShare);
502 }
#define DMUS_PORTPARAMS_EFFECTS
Definition: dmusicc.h:208
#define DMUS_PORTPARAMS_CHANNELGROUPS
Definition: dmusicc.h:205
GLenum const GLfloat * params
Definition: glext.h:5645
#define TRACE(s)
Definition: solgame.cpp:4
#define DMUS_PORTPARAMS_AUDIOCHANNELS
Definition: dmusicc.h:206
#define DMUS_PORTPARAMS_VOICES
Definition: dmusicc.h:204
#define DMUS_PORTPARAMS_SHARE
Definition: dmusicc.h:209
static const char * debugstr_DMUS_PORTPARAMS_FLAGS(DWORD flagmask)
Definition: dmusic_main.c:477
#define DMUS_PORTPARAMS_SAMPLERATE
Definition: dmusicc.h:207

Referenced by IDirectMusic8Impl_CreatePort().

◆ even_or_odd()

int even_or_odd ( DWORD  number)

Definition at line 216 of file dmusic_main.c.

216  {
217  return (number & 0x1); /* basically, check if bit 0 is set ;) */
218 }
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
static size_t double number
Definition: printf.c:64

Referenced by IPersistStreamImpl_Load().

◆ impl_from_IClassFactory()

static IClassFactoryImpl* impl_from_IClassFactory ( IClassFactory iface)
inlinestatic

Definition at line 54 of file dmusic_main.c.

55 {
56  return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface);
57 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by ClassFactory_CreateInstance().

◆ MIDILOCALE2Patch()

DWORD MIDILOCALE2Patch ( const MIDILOCALE pLocale)

Definition at line 197 of file dmusic_main.c.

197  {
198  DWORD dwPatch = 0;
199  if (!pLocale) return 0;
200  dwPatch |= (pLocale->ulBank & F_INSTRUMENT_DRUMS); /* set drum bit */
201  dwPatch |= ((pLocale->ulBank & 0x00007F7F) << 8); /* set MIDI bank location */
202  dwPatch |= (pLocale->ulInstrument & 0x0000007F); /* set PC value */
203  return dwPatch;
204 }
ULONG ulInstrument
Definition: dls1.h:97
ULONG ulBank
Definition: dls1.h:96
#define F_INSTRUMENT_DRUMS
Definition: dls1.h:51
unsigned long DWORD
Definition: ntddk_ex.h:95

Referenced by IDirectMusicInstrumentImpl_GetPatch(), IPersistStreamImpl_Load(), and SynthPortImpl_IDirectMusicPort_DownloadInstrument().

◆ Patch2MIDILOCALE()

void Patch2MIDILOCALE ( DWORD  dwPatch,
LPMIDILOCALE  pLocale 
)

Definition at line 207 of file dmusic_main.c.

207  {
208  memset (pLocale, 0, sizeof(MIDILOCALE));
209 
210  pLocale->ulInstrument = (dwPatch & 0x7F); /* get PC value */
211  pLocale->ulBank = ((dwPatch & 0x007F7F00) >> 8); /* get MIDI bank location */
212  pLocale->ulBank |= (dwPatch & F_INSTRUMENT_DRUMS); /* get drum bit */
213 }
ULONG ulInstrument
Definition: dls1.h:97
ULONG ulBank
Definition: dls1.h:96
#define F_INSTRUMENT_DRUMS
Definition: dls1.h:51
#define memset(x, y, z)
Definition: compat.h:39

Referenced by IDirectMusicInstrumentImpl_SetPatch().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( dmusic  )

Variable Documentation

◆ classfactory_vtbl

const IClassFactoryVtbl classfactory_vtbl
static
Initial value:
= {
}
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: dmusic_main.c:86
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock)
Definition: dmusic_main.c:103
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: dmusic_main.c:79
static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppv)
Definition: dmusic_main.c:93
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: dmusic_main.c:59

Definition at line 115 of file dmusic_main.c.

◆ Collection_CF

IClassFactoryImpl Collection_CF
static
Initial value:
static const IClassFactoryVtbl classfactory_vtbl
Definition: dmusic_main.c:115
HRESULT WINAPI DMUSIC_CreateDirectMusicCollectionImpl(LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter)
Definition: collection.c:536

Definition at line 124 of file dmusic_main.c.

Referenced by DllGetClassObject().

◆ DirectMusic_CF

Definition at line 123 of file dmusic_main.c.

Referenced by DllGetClassObject().

◆ DMUSIC_refCount

LONG DMUSIC_refCount = 0

Definition at line 44 of file dmusic_main.c.

Referenced by DllCanUnloadNow(), DMUSIC_LockModule(), and DMUSIC_UnlockModule().

◆ instance

HINSTANCE instance
static

Definition at line 43 of file dmusic_main.c.

Referenced by DllMain(), DllRegisterServer(), and DllUnregisterServer().

◆ threading

coclass WICGCEMetadataReader threading