Commit 0382ea1d authored by Rok Mandeljc's avatar Rok Mandeljc Committed by Alexandre Julliard

- updated resources to DX9

- completely rewritten headers (DX9 compat.; look much nicer now ;=) - removed IDirectMusicSong and IDirectMusicMelodyFormulationTrack (which are removed from DX9; weren't implemented in DX8 anyway) - combined/simplified IDirectMusicSomething / IDirectMusicObject / IPersistStream for objects that support loading - implemented IDirectMusicObject on all such objects; via generic functions - combined IDirectMusicTrack(8)/IPersistStream on all tracks - fully implemented IDirectMusicContainer (at least 90% if there are no private interfaces) - implemented IDirectMusicCollection (99% work & MS compliant behaviour; except for instruments) - tried to implement IDirectMusicInstrument (unfortunately uses some dirty private interfaces... :( - added dswave.dll; DirectMusic Wave - some changes in style - many, many more ;)
parent 236c8a24
......@@ -1498,6 +1498,7 @@ dlls/dplayx/Makefile
dlls/dpnhpast/Makefile
dlls/dsound/Makefile
dlls/dsound/tests/Makefile
dlls/dswave/Makefile
dlls/gdi/Makefile
dlls/gdi/tests/Makefile
dlls/glu32/Makefile
......
......@@ -46,6 +46,7 @@ BASEDIRS = \
dplayx \
dpnhpast \
dsound \
dswave \
gdi \
iccvid \
icmp \
......@@ -239,6 +240,7 @@ SYMLINKS = \
dplayx.dll$(DLLEXT) \
dpnhpast.dll$(DLLEXT) \
dsound.dll$(DLLEXT) \
dswave.dll$(DLLEXT) \
gdi32.dll$(DLLEXT) \
iccvid.dll$(DLLEXT) \
icmp.dll$(DLLEXT) \
......@@ -446,6 +448,9 @@ dpnhpast.dll$(DLLEXT): dpnhpast/dpnhpast.dll$(DLLEXT)
dsound.dll$(DLLEXT): dsound/dsound.dll$(DLLEXT)
$(RM) $@ && $(LN_S) dsound/dsound.dll$(DLLEXT) $@
dswave.dll$(DLLEXT): dswave/dswave.dll$(DLLEXT)
$(RM) $@ && $(LN_S) dswave/dswave.dll$(DLLEXT) $@
gdi32.dll$(DLLEXT): gdi/gdi32.dll$(DLLEXT)
$(RM) $@ && $(LN_S) gdi/gdi32.dll$(DLLEXT) $@
......@@ -840,6 +845,7 @@ IMPORT_LIBS = \
libdplayx \
libdpnhpast \
libdsound \
libdswave \
libgdi32 \
libglu32 \
libglut32 \
......@@ -1086,6 +1092,11 @@ libdsound.def: dsound/dsound.spec.def
libdsound.a: dsound/dsound.spec.def
$(DLLTOOL) -k -l $@ -d dsound/dsound.spec.def
libdswave.def: dswave/dswave.spec.def
$(RM) $@ && $(LN_S) dswave/dswave.spec.def $@
libdswave.a: dswave/dswave.spec.def
$(DLLTOOL) -k -l $@ -d dswave/dswave.spec.def
libgdi32.def: gdi/gdi32.spec.def
$(RM) $@ && $(LN_S) gdi/gdi32.spec.def $@
libgdi32.a: gdi/gdi32.spec.def
......@@ -1495,6 +1506,7 @@ dplay/dplay.spec.def: $(WINEBUILD)
dplayx/dplayx.spec.def: $(WINEBUILD)
dpnhpast/dpnhpast.spec.def: $(WINEBUILD)
dsound/dsound.spec.def: $(WINEBUILD)
dswave/dswave.spec.def: $(WINEBUILD)
gdi/gdi32.spec.def: $(WINEBUILD)
glu32/glu32.spec.def: $(WINEBUILD)
glut32/glut32.spec.def: $(WINEBUILD)
......@@ -1611,6 +1623,7 @@ dplay/dplay.dll$(DLLEXT): dplay
dplayx/dplayx.dll$(DLLEXT): dplayx
dpnhpast/dpnhpast.dll$(DLLEXT): dpnhpast
dsound/dsound.dll$(DLLEXT): dsound
dswave/dswave.dll$(DLLEXT): dswave
gdi/gdi32.dll$(DLLEXT): gdi
glu32/glu32.dll$(DLLEXT): glu32
glut32/glut32.dll$(DLLEXT): glut32
......
/* DirectMusicBand Main
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -21,8 +21,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(dmband);
typedef struct
{
typedef struct {
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
......@@ -32,44 +31,31 @@ typedef struct
* DirectMusicBand ClassFactory
*/
static HRESULT WINAPI BandCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
static HRESULT WINAPI BandCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI BandCF_AddRef(LPCLASSFACTORY iface)
{
static ULONG WINAPI BandCF_AddRef(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI BandCF_Release(LPCLASSFACTORY iface)
{
static ULONG WINAPI BandCF_Release(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI BandCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
static HRESULT WINAPI BandCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (riid, &IID_IDirectMusicBand)) {
return DMUSIC_CreateDirectMusicBand (riid, (LPDIRECTMUSICBAND*) ppobj, pOuter);
} else if (IsEqualIID (riid, &IID_IDirectMusicObject)) {
return DMUSIC_CreateDirectMusicBandObject (riid, (LPDIRECTMUSICOBJECT*) ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
return DMUSIC_CreateDirectMusicBandImpl (riid, ppobj, pOuter);
}
static HRESULT WINAPI BandCF_LockServer(LPCLASSFACTORY iface,BOOL dolock)
{
static HRESULT WINAPI BandCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
......@@ -91,43 +77,31 @@ static IClassFactoryImpl Band_CF = {&BandCF_Vtbl, 1 };
* DirectMusicBandTrack ClassFactory
*/
static HRESULT WINAPI BandTrackCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
static HRESULT WINAPI BandTrackCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI BandTrackCF_AddRef(LPCLASSFACTORY iface)
{
static ULONG WINAPI BandTrackCF_AddRef(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI BandTrackCF_Release(LPCLASSFACTORY iface)
{
static ULONG WINAPI BandTrackCF_Release(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI BandTrackCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
static HRESULT WINAPI BandTrackCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (riid, &IID_IDirectMusicTrack)
|| IsEqualIID (riid, &IID_IDirectMusicTrack8)) {
return DMUSIC_CreateDirectMusicBandTrack (riid, (LPDIRECTMUSICTRACK8*) ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
return DMUSIC_CreateDirectMusicBandTrack (riid, ppobj, pOuter);
}
static HRESULT WINAPI BandTrackCF_LockServer(LPCLASSFACTORY iface,BOOL dolock)
{
static HRESULT WINAPI BandTrackCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
......@@ -149,15 +123,11 @@ static IClassFactoryImpl BandTrack_CF = {&BandTrackCF_Vtbl, 1 };
*
*
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
if (fdwReason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
} else if (fdwReason == DLL_PROCESS_DETACH) {
/* FIXME: Cleanup */
}
......@@ -170,10 +140,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
*
*
*/
HRESULT WINAPI DMBAND_DllCanUnloadNow(void)
{
HRESULT WINAPI DMBAND_DllCanUnloadNow(void) {
FIXME("(void): stub\n");
return S_FALSE;
}
......@@ -183,8 +151,7 @@ HRESULT WINAPI DMBAND_DllCanUnloadNow(void)
*
*
*/
HRESULT WINAPI DMBAND_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
HRESULT WINAPI DMBAND_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) {
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (rclsid, &CLSID_DirectMusicBand) && IsEqualIID (riid, &IID_IClassFactory)) {
......
......@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
#include "dmband_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmband);
......@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmband);
/***********************************************************************
* interface for self-registering
*/
struct regsvr_interface
{
struct regsvr_interface {
IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */
......@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass
{
struct regsvr_coclass {
CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */
......@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/***********************************************************************
* register_interfaces
*/
static HRESULT register_interfaces(struct regsvr_interface const *list)
{
static HRESULT register_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -194,8 +177,7 @@ error_return:
/***********************************************************************
* unregister_interfaces
*/
static HRESULT unregister_interfaces(struct regsvr_interface const *list)
{
static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -219,8 +201,7 @@ error_return:
/***********************************************************************
* register_coclasses
*/
static HRESULT register_coclasses(struct regsvr_coclass const *list)
{
static HRESULT register_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -301,8 +282,7 @@ error_return:
/***********************************************************************
* unregister_coclasses
*/
static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
{
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -338,8 +318,7 @@ error_return:
/***********************************************************************
* regsvr_key_guid
*/
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
{
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
WCHAR buf[39];
StringFromGUID2(guid, buf, 39);
......@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW(
HKEY base,
WCHAR const *name,
WCHAR const *value)
{
WCHAR const *value) {
LONG res;
HKEY key;
......@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA(
HKEY base,
WCHAR const *name,
char const *value)
{
char const *value) {
LONG res;
HKEY key;
......@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid,
char const *curver_progid,
char const *name,
char const *extra)
{
char const *extra) {
LONG res;
HKEY progid_key;
......@@ -439,8 +415,7 @@ error_close_progid_key:
/***********************************************************************
* recursive_delete_key
*/
static LONG recursive_delete_key(HKEY key)
{
static LONG recursive_delete_key(HKEY key) {
LONG res;
WCHAR subkey_name[MAX_PATH];
DWORD cName;
......@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/***********************************************************************
* recursive_delete_keyA
*/
static LONG recursive_delete_keyA(HKEY base, char const *name)
{
static LONG recursive_delete_keyA(HKEY base, char const *name) {
LONG res;
HKEY key;
......@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/***********************************************************************
* recursive_delete_keyW
*/
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name)
{
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
LONG res;
HKEY key;
......@@ -534,8 +507,7 @@ static struct regsvr_interface const interface_list[] = {
/***********************************************************************
* DllRegisterServer (DMBAND.3)
*/
HRESULT WINAPI DMBAND_DllRegisterServer(void)
{
HRESULT WINAPI DMBAND_DllRegisterServer(void) {
HRESULT hr;
TRACE("\n");
......@@ -549,8 +521,7 @@ HRESULT WINAPI DMBAND_DllRegisterServer(void)
/***********************************************************************
* DllUnregisterServer (DMBAND.4)
*/
HRESULT WINAPI DMBAND_DllUnregisterServer(void)
{
HRESULT WINAPI DMBAND_DllUnregisterServer(void) {
HRESULT hr;
TRACE("\n");
......
/*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Band"
#define WINE_FILENAME_STR "dmband.dll"
#define WINE_FILEVERSION 4,8,1,881
#define WINE_FILEVERSION_STR "4.8.1.881"
#define WINE_PRODUCTVERSION 4,8,1,881
#define WINE_PRODUCTVERSION_STR "4.8"
#define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc"
/* IDirectMusicComposer
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmcompos_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmcompos);
/* IDirectMusicComposer IUnknown parts follow: */
HRESULT WINAPI IDirectMusicComposerImpl_QueryInterface (LPDIRECTMUSICCOMPOSER iface, REFIID riid, LPVOID *ppobj)
{
/* IDirectMusicComposerImpl IUnknown part: */
HRESULT WINAPI IDirectMusicComposerImpl_QueryInterface (LPDIRECTMUSICCOMPOSER iface, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IDirectMusicComposerImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) ||
......@@ -44,15 +35,13 @@ HRESULT WINAPI IDirectMusicComposerImpl_QueryInterface (LPDIRECTMUSICCOMPOSER if
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicComposerImpl_AddRef (LPDIRECTMUSICCOMPOSER iface)
{
ULONG WINAPI IDirectMusicComposerImpl_AddRef (LPDIRECTMUSICCOMPOSER iface) {
ICOM_THIS(IDirectMusicComposerImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicComposerImpl_Release (LPDIRECTMUSICCOMPOSER iface)
{
ULONG WINAPI IDirectMusicComposerImpl_Release (LPDIRECTMUSICCOMPOSER iface) {
ICOM_THIS(IDirectMusicComposerImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
......@@ -62,63 +51,44 @@ ULONG WINAPI IDirectMusicComposerImpl_Release (LPDIRECTMUSICCOMPOSER iface)
return ref;
}
/* IDirectMusicComposer Interface follow: */
HRESULT WINAPI IDirectMusicComposerImpl_ComposeSegmentFromTemplate (LPDIRECTMUSICCOMPOSER iface, IDirectMusicStyle* pStyle, IDirectMusicSegment* pTemplate, WORD wActivity, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppSegment)
{
/* IDirectMusicComposerImpl IDirectMusicComposer part: */
HRESULT WINAPI IDirectMusicComposerImpl_ComposeSegmentFromTemplate (LPDIRECTMUSICCOMPOSER iface, IDirectMusicStyle* pStyle, IDirectMusicSegment* pTemplate, WORD wActivity, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppSegment) {
ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %p, %p, %d, %p, %p): stub\n", This, pStyle, pTemplate, wActivity, pChordMap, ppSegment);
return S_OK;
}
HRESULT WINAPI IDirectMusicComposerImpl_ComposeSegmentFromShape (LPDIRECTMUSICCOMPOSER iface, IDirectMusicStyle* pStyle, WORD wNumMeasures, WORD wShape, WORD wActivity, BOOL fIntro, BOOL fEnd, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppSegment)
{
HRESULT WINAPI IDirectMusicComposerImpl_ComposeSegmentFromShape (LPDIRECTMUSICCOMPOSER iface, IDirectMusicStyle* pStyle, WORD wNumMeasures, WORD wShape, WORD wActivity, BOOL fIntro, BOOL fEnd, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppSegment) {
ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %p, %d, %d, %d, %d, %d, %p, %p): stub\n", This, pStyle, wNumMeasures, wShape, wActivity, fIntro, fEnd, pChordMap, ppSegment);
return S_OK;
}
HRESULT WINAPI IDirectMusicComposerImpl_ComposeTransition (LPDIRECTMUSICCOMPOSER iface, IDirectMusicSegment* pFromSeg, IDirectMusicSegment* pToSeg, MUSIC_TIME mtTime, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppTransSeg)
{
HRESULT WINAPI IDirectMusicComposerImpl_ComposeTransition (LPDIRECTMUSICCOMPOSER iface, IDirectMusicSegment* pFromSeg, IDirectMusicSegment* pToSeg, MUSIC_TIME mtTime, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppTransSeg) {
ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %p, %p, %ld, %d, %ld, %p, %p): stub\n", This, pFromSeg, pToSeg, mtTime, wCommand, dwFlags, pChordMap, ppTransSeg);
return S_OK;
}
HRESULT WINAPI IDirectMusicComposerImpl_AutoTransition (LPDIRECTMUSICCOMPOSER iface, IDirectMusicPerformance* pPerformance, IDirectMusicSegment* pToSeg, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppTransSeg, IDirectMusicSegmentState** ppToSegState, IDirectMusicSegmentState** ppTransSegState)
{
HRESULT WINAPI IDirectMusicComposerImpl_AutoTransition (LPDIRECTMUSICCOMPOSER iface, IDirectMusicPerformance* pPerformance, IDirectMusicSegment* pToSeg, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppTransSeg, IDirectMusicSegmentState** ppToSegState, IDirectMusicSegmentState** ppTransSegState) {
ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %p, %d, %ld, %p, %p, %p, %p): stub\n", This, pPerformance, wCommand, dwFlags, pChordMap, ppTransSeg, ppToSegState, ppTransSegState);
return S_OK;
}
HRESULT WINAPI IDirectMusicComposerImpl_ComposeTemplateFromShape (LPDIRECTMUSICCOMPOSER iface, WORD wNumMeasures, WORD wShape, BOOL fIntro, BOOL fEnd, WORD wEndLength, IDirectMusicSegment** ppTemplate)
{
HRESULT WINAPI IDirectMusicComposerImpl_ComposeTemplateFromShape (LPDIRECTMUSICCOMPOSER iface, WORD wNumMeasures, WORD wShape, BOOL fIntro, BOOL fEnd, WORD wEndLength, IDirectMusicSegment** ppTemplate) {
ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %d, %d, %d, %d, %d, %p): stub\n", This, wNumMeasures, wShape, fIntro, fEnd, wEndLength, ppTemplate);
return S_OK;
}
HRESULT WINAPI IDirectMusicComposerImpl_ChangeChordMap (LPDIRECTMUSICCOMPOSER iface, IDirectMusicSegment* pSegment, BOOL fTrackScale, IDirectMusicChordMap* pChordMap)
{
HRESULT WINAPI IDirectMusicComposerImpl_ChangeChordMap (LPDIRECTMUSICCOMPOSER iface, IDirectMusicSegment* pSegment, BOOL fTrackScale, IDirectMusicChordMap* pChordMap) {
ICOM_THIS(IDirectMusicComposerImpl,iface);
FIXME("(%p, %p, %d, %p): stub\n", This, pSegment, fTrackScale, pChordMap);
return S_OK;
}
ICOM_VTABLE(IDirectMusicComposer) DirectMusicComposer_Vtbl =
{
ICOM_VTABLE(IDirectMusicComposer) DirectMusicComposer_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicComposerImpl_QueryInterface,
IDirectMusicComposerImpl_AddRef,
......@@ -132,22 +102,16 @@ ICOM_VTABLE(IDirectMusicComposer) DirectMusicComposer_Vtbl =
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicComposer (LPCGUID lpcGUID, LPDIRECTMUSICCOMPOSER* ppDMCP, LPUNKNOWN pUnkOuter)
{
IDirectMusicComposerImpl* dmcompos;
if (IsEqualIID (lpcGUID, &IID_IDirectMusicComposer)) {
dmcompos = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicComposerImpl));
if (NULL == dmcompos) {
*ppDMCP = (LPDIRECTMUSICCOMPOSER) NULL;
HRESULT WINAPI DMUSIC_CreateDirectMusicComposerImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
IDirectMusicComposerImpl* obj;
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicComposerImpl));
if (NULL == obj) {
*ppobj = (LPDIRECTMUSICCOMPOSER) NULL;
return E_OUTOFMEMORY;
}
dmcompos->lpVtbl = &DirectMusicComposer_Vtbl;
dmcompos->ref = 1;
*ppDMCP = (LPDIRECTMUSICCOMPOSER) dmcompos;
return S_OK;
}
WARN("No interface found\n");
obj->lpVtbl = &DirectMusicComposer_Vtbl;
obj->ref = 0; /* will be inited by QueryInterface */
return E_NOINTERFACE;
return IDirectMusicComposerImpl_QueryInterface ((LPDIRECTMUSICCOMPOSER)obj, lpcGUID, ppobj);
}
......@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
#include "dmcompos_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmcompos);
......@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmcompos);
/***********************************************************************
* interface for self-registering
*/
struct regsvr_interface
{
struct regsvr_interface {
IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */
......@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass
{
struct regsvr_coclass {
CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */
......@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/***********************************************************************
* register_interfaces
*/
static HRESULT register_interfaces(struct regsvr_interface const *list)
{
static HRESULT register_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -194,8 +177,7 @@ error_return:
/***********************************************************************
* unregister_interfaces
*/
static HRESULT unregister_interfaces(struct regsvr_interface const *list)
{
static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -219,8 +201,7 @@ error_return:
/***********************************************************************
* register_coclasses
*/
static HRESULT register_coclasses(struct regsvr_coclass const *list)
{
static HRESULT register_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -301,8 +282,7 @@ error_return:
/***********************************************************************
* unregister_coclasses
*/
static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
{
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -338,8 +318,7 @@ error_return:
/***********************************************************************
* regsvr_key_guid
*/
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
{
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
WCHAR buf[39];
StringFromGUID2(guid, buf, 39);
......@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW(
HKEY base,
WCHAR const *name,
WCHAR const *value)
{
WCHAR const *value) {
LONG res;
HKEY key;
......@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA(
HKEY base,
WCHAR const *name,
char const *value)
{
char const *value) {
LONG res;
HKEY key;
......@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid,
char const *curver_progid,
char const *name,
char const *extra)
{
char const *extra) {
LONG res;
HKEY progid_key;
......@@ -439,8 +415,7 @@ error_close_progid_key:
/***********************************************************************
* recursive_delete_key
*/
static LONG recursive_delete_key(HKEY key)
{
static LONG recursive_delete_key(HKEY key) {
LONG res;
WCHAR subkey_name[MAX_PATH];
DWORD cName;
......@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/***********************************************************************
* recursive_delete_keyA
*/
static LONG recursive_delete_keyA(HKEY base, char const *name)
{
static LONG recursive_delete_keyA(HKEY base, char const *name) {
LONG res;
HKEY key;
......@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/***********************************************************************
* recursive_delete_keyW
*/
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name)
{
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
LONG res;
HKEY key;
......@@ -558,8 +531,7 @@ static struct regsvr_interface const interface_list[] = {
/***********************************************************************
* DllRegisterServer (DMCOMPOS.3)
*/
HRESULT WINAPI DMCOMPOS_DllRegisterServer(void)
{
HRESULT WINAPI DMCOMPOS_DllRegisterServer(void) {
HRESULT hr;
TRACE("\n");
......@@ -573,8 +545,7 @@ HRESULT WINAPI DMCOMPOS_DllRegisterServer(void)
/***********************************************************************
* DllUnregisterServer (DMCOMPOS.4)
*/
HRESULT WINAPI DMCOMPOS_DllUnregisterServer(void)
{
HRESULT WINAPI DMCOMPOS_DllUnregisterServer(void) {
HRESULT hr;
TRACE("\n");
......
/*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Composer"
#define WINE_FILENAME_STR "dmcompos.dll"
#define WINE_FILEVERSION 4,8,1,881
#define WINE_FILEVERSION_STR "4.8.1.881"
#define WINE_PRODUCTVERSION 4,8,1,881
#define WINE_PRODUCTVERSION_STR "4.8"
#define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc"
......@@ -20,7 +20,6 @@ C_SRCS = \
segmentstate.c \
segtriggertrack.c \
seqtrack.c \
song.c \
sysextrack.c \
tempotrack.c \
timesigtrack.c \
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/* IDirectMusicPatternTrack Implementation
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmime);
/* IDirectMusicPatternTrack IUnknown parts follow: */
HRESULT WINAPI IDirectMusicPatternTrackImpl_QueryInterface (LPDIRECTMUSICPATTERNTRACK iface, REFIID riid, LPVOID *ppobj)
{
HRESULT WINAPI IDirectMusicPatternTrackImpl_QueryInterface (LPDIRECTMUSICPATTERNTRACK iface, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) ||
......@@ -45,15 +36,13 @@ HRESULT WINAPI IDirectMusicPatternTrackImpl_QueryInterface (LPDIRECTMUSICPATTERN
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicPatternTrackImpl_AddRef (LPDIRECTMUSICPATTERNTRACK iface)
{
ULONG WINAPI IDirectMusicPatternTrackImpl_AddRef (LPDIRECTMUSICPATTERNTRACK iface) {
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicPatternTrackImpl_Release (LPDIRECTMUSICPATTERNTRACK iface)
{
ULONG WINAPI IDirectMusicPatternTrackImpl_Release (LPDIRECTMUSICPATTERNTRACK iface) {
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
......@@ -64,35 +53,25 @@ ULONG WINAPI IDirectMusicPatternTrackImpl_Release (LPDIRECTMUSICPATTERNTRACK ifa
}
/* IDirectMusicPatternTrack Interface follow: */
HRESULT WINAPI IDirectMusicPatternTrackImpl_CreateSegment (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicStyle* pStyle, IDirectMusicSegment** ppSegment)
{
HRESULT WINAPI IDirectMusicPatternTrackImpl_CreateSegment (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicStyle* pStyle, IDirectMusicSegment** ppSegment) {
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
FIXME("(%p, %p, %p): stub\n", This, pStyle, ppSegment);
return S_OK;
}
HRESULT WINAPI IDirectMusicPatternTrackImpl_SetVariation (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicSegmentState* pSegState, DWORD dwVariationFlags, DWORD dwPart)
{
HRESULT WINAPI IDirectMusicPatternTrackImpl_SetVariation (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicSegmentState* pSegState, DWORD dwVariationFlags, DWORD dwPart) {
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
FIXME("(%p, %p, %ld, %ld): stub\n", This, pSegState, dwVariationFlags, dwPart);
return S_OK;
}
HRESULT WINAPI IDirectMusicPatternTrackImpl_SetPatternByName (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicSegmentState* pSegState, WCHAR* wszName, IDirectMusicStyle* pStyle, DWORD dwPatternType, DWORD* pdwLength)
{
HRESULT WINAPI IDirectMusicPatternTrackImpl_SetPatternByName (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicSegmentState* pSegState, WCHAR* wszName, IDirectMusicStyle* pStyle, DWORD dwPatternType, DWORD* pdwLength) {
ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
FIXME("(%p, %p, %p, %p, %ld, %p): stub\n", This, pSegState, wszName, pStyle, dwPatternType, pdwLength);
return S_OK;
}
ICOM_VTABLE(IDirectMusicPatternTrack) DirectMusicPatternTrack_Vtbl =
{
ICOM_VTABLE(IDirectMusicPatternTrack) DirectMusicPatternTrack_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicPatternTrackImpl_QueryInterface,
IDirectMusicPatternTrackImpl_AddRef,
......@@ -103,14 +82,16 @@ ICOM_VTABLE(IDirectMusicPatternTrack) DirectMusicPatternTrack_Vtbl =
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicPatternTrack (LPCGUID lpcGUID, LPDIRECTMUSICPATTERNTRACK *ppDMPtrnTrack, LPUNKNOWN pUnkOuter)
{
if (IsEqualIID (lpcGUID, &IID_IDirectMusicComposer))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
HRESULT WINAPI DMUSIC_CreateDirectMusicPatternTrackImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
IDirectMusicPatternTrackImpl* track;
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPatternTrackImpl));
if (NULL == track) {
*ppobj = (LPVOID) NULL;
return E_OUTOFMEMORY;
}
track->lpVtbl = &DirectMusicPatternTrack_Vtbl;
track->ref = 0; /* will be inited by QueryInterface */
WARN("No interface found\n");
return E_NOINTERFACE;
return IDirectMusicPatternTrackImpl_QueryInterface ((LPDIRECTMUSICPATTERNTRACK)track, lpcGUID, ppobj);
}
......@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
#include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmime);
......@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmime);
/***********************************************************************
* interface for self-registering
*/
struct regsvr_interface
{
struct regsvr_interface {
IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */
......@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass
{
struct regsvr_coclass {
CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */
......@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/***********************************************************************
* register_interfaces
*/
static HRESULT register_interfaces(struct regsvr_interface const *list)
{
static HRESULT register_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -194,8 +177,7 @@ error_return:
/***********************************************************************
* unregister_interfaces
*/
static HRESULT unregister_interfaces(struct regsvr_interface const *list)
{
static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -219,8 +201,7 @@ error_return:
/***********************************************************************
* register_coclasses
*/
static HRESULT register_coclasses(struct regsvr_coclass const *list)
{
static HRESULT register_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -301,8 +282,7 @@ error_return:
/***********************************************************************
* unregister_coclasses
*/
static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
{
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -338,8 +318,7 @@ error_return:
/***********************************************************************
* regsvr_key_guid
*/
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
{
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
WCHAR buf[39];
StringFromGUID2(guid, buf, 39);
......@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW(
HKEY base,
WCHAR const *name,
WCHAR const *value)
{
WCHAR const *value) {
LONG res;
HKEY key;
......@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA(
HKEY base,
WCHAR const *name,
char const *value)
{
char const *value) {
LONG res;
HKEY key;
......@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid,
char const *curver_progid,
char const *name,
char const *extra)
{
char const *extra) {
LONG res;
HKEY progid_key;
......@@ -439,8 +415,7 @@ error_close_progid_key:
/***********************************************************************
* recursive_delete_key
*/
static LONG recursive_delete_key(HKEY key)
{
static LONG recursive_delete_key(HKEY key) {
LONG res;
WCHAR subkey_name[MAX_PATH];
DWORD cName;
......@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/***********************************************************************
* recursive_delete_keyA
*/
static LONG recursive_delete_keyA(HKEY base, char const *name)
{
static LONG recursive_delete_keyA(HKEY base, char const *name) {
LONG res;
HKEY key;
......@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/***********************************************************************
* recursive_delete_keyW
*/
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name)
{
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
LONG res;
HKEY key;
......@@ -592,14 +565,6 @@ static struct regsvr_coclass const coclass_list[] = {
"Microsoft.DirectMusicLyricsTrack.1",
"Microsoft.DirectMusicLyricsTrack"
},
{ &CLSID_DirectMusicSong,
"DirectMusicSong",
NULL,
"dmime.dll",
"Both",
"Microsoft.DirectMusicSong.1",
"Microsoft.DirectMusicSong"
},
{ &CLSID_DirectMusicSegTriggerTrack,
"DirectMusicSegTriggerTrack",
NULL,
......@@ -638,8 +603,7 @@ static struct regsvr_interface const interface_list[] = {
/***********************************************************************
* DllRegisterServer (DMIME.3)
*/
HRESULT WINAPI DMIME_DllRegisterServer(void)
{
HRESULT WINAPI DMIME_DllRegisterServer(void) {
HRESULT hr;
TRACE("\n");
......@@ -653,8 +617,7 @@ HRESULT WINAPI DMIME_DllRegisterServer(void)
/***********************************************************************
* DllUnregisterServer (DMIME.4)
*/
HRESULT WINAPI DMIME_DllUnregisterServer(void)
{
HRESULT WINAPI DMIME_DllUnregisterServer(void) {
HRESULT hr;
TRACE("\n");
......
/* IDirectMusicSegmentState8 Implementation
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -17,22 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmime);
/* IDirectMusicSegmentState8 IUnknown part: */
HRESULT WINAPI IDirectMusicSegmentState8Impl_QueryInterface (LPDIRECTMUSICSEGMENTSTATE8 iface, REFIID riid, LPVOID *ppobj)
{
/* IDirectMusicSegmentState8Impl IUnknown part: */
HRESULT WINAPI IDirectMusicSegmentState8Impl_QueryInterface (LPDIRECTMUSICSEGMENTSTATE8 iface, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
if (IsEqualIID(riid, &IID_IUnknown) ||
......@@ -46,15 +36,13 @@ HRESULT WINAPI IDirectMusicSegmentState8Impl_QueryInterface (LPDIRECTMUSICSEGMEN
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicSegmentState8Impl_AddRef (LPDIRECTMUSICSEGMENTSTATE8 iface)
{
ULONG WINAPI IDirectMusicSegmentState8Impl_AddRef (LPDIRECTMUSICSEGMENTSTATE8 iface) {
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicSegmentState8Impl_Release (LPDIRECTMUSICSEGMENTSTATE8 iface)
{
ULONG WINAPI IDirectMusicSegmentState8Impl_Release (LPDIRECTMUSICSEGMENTSTATE8 iface) {
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
......@@ -64,73 +52,51 @@ ULONG WINAPI IDirectMusicSegmentState8Impl_Release (LPDIRECTMUSICSEGMENTSTATE8 i
return ref;
}
/* IDirectMusicSegmentState8 IDirectMusicSegmentState part: */
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetRepeats (LPDIRECTMUSICSEGMENTSTATE8 iface, DWORD* pdwRepeats)
{
/* IDirectMusicSegmentState8Impl IDirectMusicSegmentState part: */
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetRepeats (LPDIRECTMUSICSEGMENTSTATE8 iface, DWORD* pdwRepeats) {
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pdwRepeats);
return S_OK;
}
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSegment (LPDIRECTMUSICSEGMENTSTATE8 iface, IDirectMusicSegment** ppSegment)
{
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSegment (LPDIRECTMUSICSEGMENTSTATE8 iface, IDirectMusicSegment** ppSegment) {
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, ppSegment);
return S_OK;
}
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartTime (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart)
{
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartTime (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart) {
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pmtStart);
return S_OK;
}
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSeek (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtSeek)
{
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetSeek (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtSeek) {
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pmtSeek);
return S_OK;
}
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartPoint (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart)
{
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetStartPoint (LPDIRECTMUSICSEGMENTSTATE8 iface, MUSIC_TIME* pmtStart) {
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %p): stub\n", This, pmtStart);
return S_OK;
}
/* IDirectMusicSegmentState8 IDirectMusicSegmentState8 part: */
HRESULT WINAPI IDirectMusicSegmentState8Impl_SetTrackConfig (LPDIRECTMUSICSEGMENTSTATE8 iface, REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff)
{
/* IDirectMusicSegmentState8Impl IDirectMusicSegmentState8 part: */
HRESULT WINAPI IDirectMusicSegmentState8Impl_SetTrackConfig (LPDIRECTMUSICSEGMENTSTATE8 iface, REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff) {
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %s, %ld, %ld, %ld, %ld): stub\n", This, debugstr_guid(rguidTrackClassID), dwGroupBits, dwIndex, dwFlagsOn, dwFlagsOff);
return S_OK;
}
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetObjectInPath (LPDIRECTMUSICSEGMENTSTATE8 iface, DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, DWORD dwIndex, REFGUID iidInterface, void** ppObject)
{
HRESULT WINAPI IDirectMusicSegmentState8Impl_GetObjectInPath (LPDIRECTMUSICSEGMENTSTATE8 iface, DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, DWORD dwIndex, REFGUID iidInterface, void** ppObject) {
ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
FIXME("(%p, %ld, %ld, %ld, %s, %ld, %s, %p): stub\n", This, dwPChannel, dwStage, dwBuffer, debugstr_guid(guidObject), dwIndex, debugstr_guid(iidInterface), ppObject);
return S_OK;
}
ICOM_VTABLE(IDirectMusicSegmentState8) DirectMusicSegmentState8_Vtbl =
{
ICOM_VTABLE(IDirectMusicSegmentState8) DirectMusicSegmentState8_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicSegmentState8Impl_QueryInterface,
IDirectMusicSegmentState8Impl_AddRef,
......@@ -145,14 +111,16 @@ ICOM_VTABLE(IDirectMusicSegmentState8) DirectMusicSegmentState8_Vtbl =
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentState (LPCGUID lpcGUID, LPDIRECTMUSICSEGMENTSTATE8 *ppDMSeg, LPUNKNOWN pUnkOuter)
{
if (IsEqualIID (lpcGUID, &IID_IDirectMusicSegmentState)
|| IsEqualIID (lpcGUID, &IID_IDirectMusicSegmentState8)) {
FIXME("Not yet\n");
return E_NOINTERFACE;
HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
IDirectMusicSegmentState8Impl* obj;
obj = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSegmentState8Impl));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
return E_OUTOFMEMORY;
}
WARN("No interface found\n");
obj->lpVtbl = &DirectMusicSegmentState8_Vtbl;
obj->ref = 0; /* will be inited by QueryInterface */
return E_NOINTERFACE;
return IDirectMusicSegmentState8Impl_QueryInterface ((LPDIRECTMUSICSEGMENTSTATE8)obj, lpcGUID, ppobj);
}
/* IDirectMusicTool8 Implementation
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -17,24 +17,13 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmime_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmime);
/* IDirectMusicTool8 IUnknown part: */
HRESULT WINAPI IDirectMusicTool8Impl_QueryInterface (LPDIRECTMUSICTOOL8 iface, REFIID riid, LPVOID *ppobj)
{
/* IDirectMusicTool8Impl IUnknown part: */
HRESULT WINAPI IDirectMusicTool8Impl_QueryInterface (LPDIRECTMUSICTOOL8 iface, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IDirectMusicTool8Impl,iface);
if (IsEqualIID (riid, &IID_IUnknown) ||
IsEqualIID (riid, &IID_IDirectMusicTool) ||
IsEqualIID (riid, &IID_IDirectMusicTool8)) {
......@@ -46,15 +35,13 @@ HRESULT WINAPI IDirectMusicTool8Impl_QueryInterface (LPDIRECTMUSICTOOL8 iface, R
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicTool8Impl_AddRef (LPDIRECTMUSICTOOL8 iface)
{
ULONG WINAPI IDirectMusicTool8Impl_AddRef (LPDIRECTMUSICTOOL8 iface) {
ICOM_THIS(IDirectMusicTool8Impl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicTool8Impl_Release (LPDIRECTMUSICTOOL8 iface)
{
ULONG WINAPI IDirectMusicTool8Impl_Release (LPDIRECTMUSICTOOL8 iface) {
ICOM_THIS(IDirectMusicTool8Impl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
......@@ -64,73 +51,51 @@ ULONG WINAPI IDirectMusicTool8Impl_Release (LPDIRECTMUSICTOOL8 iface)
return ref;
}
/* IDirectMusicTool8 IDirectMusicTool part: */
HRESULT WINAPI IDirectMusicTool8Impl_Init (LPDIRECTMUSICTOOL8 iface, IDirectMusicGraph* pGraph)
{
/* IDirectMusicTool8Impl IDirectMusicTool part: */
HRESULT WINAPI IDirectMusicTool8Impl_Init (LPDIRECTMUSICTOOL8 iface, IDirectMusicGraph* pGraph) {
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, pGraph);
return S_OK;
}
HRESULT WINAPI IDirectMusicTool8Impl_GetMsgDeliveryType (LPDIRECTMUSICTOOL8 iface, DWORD* pdwDeliveryType)
{
HRESULT WINAPI IDirectMusicTool8Impl_GetMsgDeliveryType (LPDIRECTMUSICTOOL8 iface, DWORD* pdwDeliveryType) {
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, pdwDeliveryType);
return S_OK;
}
HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypeArraySize (LPDIRECTMUSICTOOL8 iface, DWORD* pdwNumElements)
{
HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypeArraySize (LPDIRECTMUSICTOOL8 iface, DWORD* pdwNumElements) {
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, pdwNumElements);
return S_OK;
}
HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypes (LPDIRECTMUSICTOOL8 iface, DWORD** padwMediaTypes, DWORD dwNumElements)
{
HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypes (LPDIRECTMUSICTOOL8 iface, DWORD** padwMediaTypes, DWORD dwNumElements) {
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p, %ld): stub\n", This, padwMediaTypes, dwNumElements);
return S_OK;
}
HRESULT WINAPI IDirectMusicTool8Impl_ProcessPMsg (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG)
{
HRESULT WINAPI IDirectMusicTool8Impl_ProcessPMsg (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG) {
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p, %p): stub\n", This, pPerf, pPMSG);
return S_OK;
}
HRESULT WINAPI IDirectMusicTool8Impl_Flush (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG, REFERENCE_TIME rtTime)
{
HRESULT WINAPI IDirectMusicTool8Impl_Flush (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG, REFERENCE_TIME rtTime) {
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p, %p, %lli): stub\n", This, pPerf, pPMSG, rtTime);
return S_OK;
}
/* IDirectMusicTool8 IDirectMusicTool8 part: */
HRESULT WINAPI IDirectMusicTool8Impl_Clone (LPDIRECTMUSICTOOL8 iface, IDirectMusicTool** ppTool)
{
/* IDirectMusicTool8Impl IDirectMusicTool8 part: */
HRESULT WINAPI IDirectMusicTool8Impl_Clone (LPDIRECTMUSICTOOL8 iface, IDirectMusicTool** ppTool) {
ICOM_THIS(IDirectMusicTool8Impl,iface);
FIXME("(%p, %p): stub\n", This, ppTool);
return S_OK;
}
ICOM_VTABLE(IDirectMusicTool8) DirectMusicTool8_Vtbl =
{
ICOM_VTABLE(IDirectMusicTool8) DirectMusicTool8_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicTool8Impl_QueryInterface,
IDirectMusicTool8Impl_AddRef,
......@@ -145,13 +110,16 @@ ICOM_VTABLE(IDirectMusicTool8) DirectMusicTool8_Vtbl =
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicTool (LPCGUID lpcGUID, LPDIRECTMUSICTOOL8 *ppDMTool, LPUNKNOWN pUnkOuter)
{
if (IsEqualIID (lpcGUID, &IID_IDirectMusicComposer)) {
FIXME("Not yet\n");
return E_NOINTERFACE;
HRESULT WINAPI DMUSIC_CreateDirectMusicobjImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
IDirectMusicTool8Impl* obj;
obj = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicTool8Impl));
if (NULL == obj) {
*ppobj = (LPVOID) NULL;
return E_OUTOFMEMORY;
}
WARN("No interface found\n");
obj->lpVtbl = &DirectMusicTool8_Vtbl;
obj->ref = 0; /* will be inited by QueryInterface */
return E_NOINTERFACE;
return IDirectMusicTool8Impl_QueryInterface ((LPDIRECTMUSICTOOL8)obj, lpcGUID, ppobj);
}
/*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Interactive Engine"
#define WINE_FILENAME_STR "dmime.dll"
#define WINE_FILEVERSION 4,8,1,881
#define WINE_FILEVERSION_STR "4.8.1.881"
#define WINE_PRODUCTVERSION 4,8,1,881
#define WINE_PRODUCTVERSION_STR "4.8"
#define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc"
/* DirectMusicLoader Main
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -21,8 +21,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(dmloader);
typedef struct
{
typedef struct {
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
......@@ -31,43 +30,30 @@ typedef struct
/******************************************************************
* DirectMusicLoader ClassFactory
*/
static HRESULT WINAPI LoaderCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
static HRESULT WINAPI LoaderCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI LoaderCF_AddRef(LPCLASSFACTORY iface)
{
static ULONG WINAPI LoaderCF_AddRef(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI LoaderCF_Release(LPCLASSFACTORY iface)
{
static ULONG WINAPI LoaderCF_Release(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI LoaderCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
static HRESULT WINAPI LoaderCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (&IID_IDirectMusicLoader, riid) ||
IsEqualIID (&IID_IDirectMusicLoader8, riid)) {
return DMUSIC_CreateDirectMusicLoader(riid, (LPDIRECTMUSICLOADER8*) ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
return DMUSIC_CreateDirectMusicLoaderImpl (riid, (LPVOID*) ppobj, pOuter);
}
static HRESULT WINAPI LoaderCF_LockServer(LPCLASSFACTORY iface,BOOL dolock)
{
static HRESULT WINAPI LoaderCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
......@@ -87,44 +73,30 @@ static IClassFactoryImpl Loader_CF = {&LoaderCF_Vtbl, 1 };
/******************************************************************
* DirectMusicContainer ClassFactory
*/
static HRESULT WINAPI ContainerCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
static HRESULT WINAPI ContainerCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI ContainerCF_AddRef(LPCLASSFACTORY iface)
{
static ULONG WINAPI ContainerCF_AddRef(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI ContainerCF_Release(LPCLASSFACTORY iface)
{
static ULONG WINAPI ContainerCF_Release(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI ContainerCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
static HRESULT WINAPI ContainerCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (riid, &IID_IDirectMusicContainer)) {
return DMUSIC_CreateDirectMusicContainer (riid, (LPDIRECTMUSICCONTAINER*) ppobj, pOuter);
} else if (IsEqualIID (riid, &IID_IDirectMusicObject)) {
return DMUSIC_CreateDirectMusicContainerObject (riid, (LPDIRECTMUSICOBJECT*) ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
return DMUSIC_CreateDirectMusicContainerImpl (riid, (LPVOID*) ppobj, pOuter);
}
static HRESULT WINAPI ContainerCF_LockServer(LPCLASSFACTORY iface,BOOL dolock)
{
static HRESULT WINAPI ContainerCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
......@@ -146,18 +118,14 @@ static IClassFactoryImpl Container_CF = {&ContainerCF_Vtbl, 1 };
*
*
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
if (fdwReason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
else if (fdwReason == DLL_PROCESS_DETACH) {
/* FIXME: Cleanup */
}
return TRUE;
}
......@@ -167,10 +135,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
*
*
*/
HRESULT WINAPI DMLOADER_DllCanUnloadNow(void)
{
HRESULT WINAPI DMLOADER_DllCanUnloadNow(void) {
FIXME("(void): stub\n");
return S_FALSE;
}
......@@ -180,8 +146,7 @@ HRESULT WINAPI DMLOADER_DllCanUnloadNow(void)
*
*
*/
HRESULT WINAPI DMLOADER_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
HRESULT WINAPI DMLOADER_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) {
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (rclsid, &CLSID_DirectMusicLoader) && IsEqualIID (riid, &IID_IClassFactory)) {
*ppv = (LPVOID) &Loader_CF;
......
......@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
#include "dmloader_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmloader);
......@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmloader);
/***********************************************************************
* interface for self-registering
*/
struct regsvr_interface
{
struct regsvr_interface {
IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */
......@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass
{
struct regsvr_coclass {
CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */
......@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/***********************************************************************
* register_interfaces
*/
static HRESULT register_interfaces(struct regsvr_interface const *list)
{
static HRESULT register_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -194,8 +177,7 @@ error_return:
/***********************************************************************
* unregister_interfaces
*/
static HRESULT unregister_interfaces(struct regsvr_interface const *list)
{
static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -219,8 +201,7 @@ error_return:
/***********************************************************************
* register_coclasses
*/
static HRESULT register_coclasses(struct regsvr_coclass const *list)
{
static HRESULT register_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -301,8 +282,7 @@ error_return:
/***********************************************************************
* unregister_coclasses
*/
static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
{
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -338,8 +318,7 @@ error_return:
/***********************************************************************
* regsvr_key_guid
*/
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
{
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
WCHAR buf[39];
StringFromGUID2(guid, buf, 39);
......@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW(
HKEY base,
WCHAR const *name,
WCHAR const *value)
{
WCHAR const *value) {
LONG res;
HKEY key;
......@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA(
HKEY base,
WCHAR const *name,
char const *value)
{
char const *value) {
LONG res;
HKEY key;
......@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid,
char const *curver_progid,
char const *name,
char const *extra)
{
char const *extra) {
LONG res;
HKEY progid_key;
......@@ -439,8 +415,7 @@ error_close_progid_key:
/***********************************************************************
* recursive_delete_key
*/
static LONG recursive_delete_key(HKEY key)
{
static LONG recursive_delete_key(HKEY key) {
LONG res;
WCHAR subkey_name[MAX_PATH];
DWORD cName;
......@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/***********************************************************************
* recursive_delete_keyA
*/
static LONG recursive_delete_keyA(HKEY base, char const *name)
{
static LONG recursive_delete_keyA(HKEY base, char const *name) {
LONG res;
HKEY key;
......@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/***********************************************************************
* recursive_delete_keyW
*/
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name)
{
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
LONG res;
HKEY key;
......@@ -534,8 +507,7 @@ static struct regsvr_interface const interface_list[] = {
/***********************************************************************
* DllRegisterServer (DMLOADER.3)
*/
HRESULT WINAPI DMLOADER_DllRegisterServer(void)
{
HRESULT WINAPI DMLOADER_DllRegisterServer(void) {
HRESULT hr;
TRACE("\n");
......@@ -549,8 +521,7 @@ HRESULT WINAPI DMLOADER_DllRegisterServer(void)
/***********************************************************************
* DllUnregisterServer (DMLOADER.4)
*/
HRESULT WINAPI DMLOADER_DllUnregisterServer(void)
{
HRESULT WINAPI DMLOADER_DllUnregisterServer(void) {
HRESULT hr;
TRACE("\n");
......
/*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Loader"
#define WINE_FILENAME_STR "dmloader.dll"
#define WINE_FILEVERSION 4,8,1,881
#define WINE_FILEVERSION_STR "4.8.1.881"
#define WINE_PRODUCTVERSION 4,8,1,881
#define WINE_PRODUCTVERSION_STR "4.8"
#define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc"
......@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
#include "dmscript_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmscript);
......@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmscript);
/***********************************************************************
* interface for self-registering
*/
struct regsvr_interface
{
struct regsvr_interface {
IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */
......@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass
{
struct regsvr_coclass {
CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */
......@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/***********************************************************************
* register_interfaces
*/
static HRESULT register_interfaces(struct regsvr_interface const *list)
{
static HRESULT register_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -194,8 +177,7 @@ error_return:
/***********************************************************************
* unregister_interfaces
*/
static HRESULT unregister_interfaces(struct regsvr_interface const *list)
{
static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -219,8 +201,7 @@ error_return:
/***********************************************************************
* register_coclasses
*/
static HRESULT register_coclasses(struct regsvr_coclass const *list)
{
static HRESULT register_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -301,8 +282,7 @@ error_return:
/***********************************************************************
* unregister_coclasses
*/
static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
{
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -338,8 +318,7 @@ error_return:
/***********************************************************************
* regsvr_key_guid
*/
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
{
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
WCHAR buf[39];
StringFromGUID2(guid, buf, 39);
......@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW(
HKEY base,
WCHAR const *name,
WCHAR const *value)
{
WCHAR const *value) {
LONG res;
HKEY key;
......@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA(
HKEY base,
WCHAR const *name,
char const *value)
{
char const *value) {
LONG res;
HKEY key;
......@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid,
char const *curver_progid,
char const *name,
char const *extra)
{
char const *extra) {
LONG res;
HKEY progid_key;
......@@ -439,8 +415,7 @@ error_close_progid_key:
/***********************************************************************
* recursive_delete_key
*/
static LONG recursive_delete_key(HKEY key)
{
static LONG recursive_delete_key(HKEY key) {
LONG res;
WCHAR subkey_name[MAX_PATH];
DWORD cName;
......@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/***********************************************************************
* recursive_delete_keyA
*/
static LONG recursive_delete_keyA(HKEY base, char const *name)
{
static LONG recursive_delete_keyA(HKEY base, char const *name) {
LONG res;
HKEY key;
......@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/***********************************************************************
* recursive_delete_keyW
*/
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name)
{
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
LONG res;
HKEY key;
......@@ -599,8 +572,7 @@ static struct regsvr_interface const interface_list[] = {
/***********************************************************************
* DllRegisterServer (DMSCRIPT.3)
*/
HRESULT WINAPI DMSCRIPT_DllRegisterServer(void)
{
HRESULT WINAPI DMSCRIPT_DllRegisterServer(void) {
HRESULT hr;
TRACE("\n");
......@@ -614,8 +586,7 @@ HRESULT WINAPI DMSCRIPT_DllRegisterServer(void)
/***********************************************************************
* DllUnregisterServer (DMSCRIPT.4)
*/
HRESULT WINAPI DMSCRIPT_DllUnregisterServer(void)
{
HRESULT WINAPI DMSCRIPT_DllUnregisterServer(void) {
HRESULT hr;
TRACE("\n");
......
/*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Scripting"
#define WINE_FILENAME_STR "dmscript.dll"
#define WINE_FILEVERSION 4,8,1,881
#define WINE_FILEVERSION_STR "4.8.1.881"
#define WINE_PRODUCTVERSION 4,8,1,881
#define WINE_PRODUCTVERSION_STR "4.8"
#define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc"
......@@ -11,7 +11,6 @@ C_SRCS = \
chordtrack.c \
commandtrack.c \
dmstyle_main.c \
melodyformulationtrack.c \
motiftrack.c \
mutetrack.c \
regsvr.c \
......
......@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
#include "dmstyle_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmstyle);
......@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmstyle);
/***********************************************************************
* interface for self-registering
*/
struct regsvr_interface
{
struct regsvr_interface {
IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */
......@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass
{
struct regsvr_coclass {
CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */
......@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/***********************************************************************
* register_interfaces
*/
static HRESULT register_interfaces(struct regsvr_interface const *list)
{
static HRESULT register_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -194,8 +177,7 @@ error_return:
/***********************************************************************
* unregister_interfaces
*/
static HRESULT unregister_interfaces(struct regsvr_interface const *list)
{
static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -219,8 +201,7 @@ error_return:
/***********************************************************************
* register_coclasses
*/
static HRESULT register_coclasses(struct regsvr_coclass const *list)
{
static HRESULT register_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -301,8 +282,7 @@ error_return:
/***********************************************************************
* unregister_coclasses
*/
static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
{
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -338,8 +318,7 @@ error_return:
/***********************************************************************
* regsvr_key_guid
*/
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
{
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
WCHAR buf[39];
StringFromGUID2(guid, buf, 39);
......@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW(
HKEY base,
WCHAR const *name,
WCHAR const *value)
{
WCHAR const *value) {
LONG res;
HKEY key;
......@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA(
HKEY base,
WCHAR const *name,
char const *value)
{
char const *value) {
LONG res;
HKEY key;
......@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid,
char const *curver_progid,
char const *name,
char const *extra)
{
char const *extra) {
LONG res;
HKEY progid_key;
......@@ -439,8 +415,7 @@ error_close_progid_key:
/***********************************************************************
* recursive_delete_key
*/
static LONG recursive_delete_key(HKEY key)
{
static LONG recursive_delete_key(HKEY key) {
LONG res;
WCHAR subkey_name[MAX_PATH];
DWORD cName;
......@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/***********************************************************************
* recursive_delete_keyA
*/
static LONG recursive_delete_keyA(HKEY base, char const *name)
{
static LONG recursive_delete_keyA(HKEY base, char const *name) {
LONG res;
HKEY key;
......@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/***********************************************************************
* recursive_delete_keyW
*/
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name)
{
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
LONG res;
HKEY key;
......@@ -568,14 +541,6 @@ static struct regsvr_coclass const coclass_list[] = {
"Microsoft.DirectMusicMuteTrack.1",
"Microsoft.DirectMusicMuteTrack"
},
{ &CLSID_DirectMusicMelodyFormulationTrack,
"DirectMusicMelodyFormulationTrack",
NULL,
"dmstyle.dll",
"Both",
"Microsoft.DirectMusicMelodyFormulationTrack.1",
"Microsoft.DirectMusicMelodyFormulationTrack"
},
{ NULL } /* list terminator */
};
......@@ -590,8 +555,7 @@ static struct regsvr_interface const interface_list[] = {
/***********************************************************************
* DllRegisterServer (DMSTYLE.3)
*/
HRESULT WINAPI DMSTYLE_DllRegisterServer()
{
HRESULT WINAPI DMSTYLE_DllRegisterServer() {
HRESULT hr;
TRACE("\n");
......@@ -605,8 +569,7 @@ HRESULT WINAPI DMSTYLE_DllRegisterServer()
/***********************************************************************
* DllUnregisterServer (DMSTYLE.4)
*/
HRESULT WINAPI DMSTYLE_DllUnregisterServer()
{
HRESULT WINAPI DMSTYLE_DllUnregisterServer() {
HRESULT hr;
TRACE("\n");
......
/*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Style Engine"
#define WINE_FILENAME_STR "dmstyle.dll"
#define WINE_FILEVERSION 4,8,1,881
#define WINE_FILEVERSION_STR "4.8.1.881"
#define WINE_PRODUCTVERSION 4,8,1,881
#define WINE_PRODUCTVERSION_STR "4.8"
#define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc"
/* DirectMusicSynthesizer Main
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -21,8 +21,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(dmsynth);
typedef struct
{
typedef struct {
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
......@@ -31,43 +30,30 @@ typedef struct
/******************************************************************
* DirectMusicSynth ClassFactory
*/
static HRESULT WINAPI SynthCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
static HRESULT WINAPI SynthCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI SynthCF_AddRef(LPCLASSFACTORY iface)
{
static ULONG WINAPI SynthCF_AddRef(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI SynthCF_Release(LPCLASSFACTORY iface)
{
static ULONG WINAPI SynthCF_Release(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI SynthCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
static HRESULT WINAPI SynthCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (riid, &IID_IDirectMusicSynth) ||
IsEqualIID (riid, &IID_IDirectMusicSynth8)) {
return DMUSIC_CreateDirectMusicSynth (riid, (LPDIRECTMUSICSYNTH8*)ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
return DMUSIC_CreateDirectMusicSynthImpl (riid, ppobj, pOuter);
}
static HRESULT WINAPI SynthCF_LockServer(LPCLASSFACTORY iface,BOOL dolock)
{
static HRESULT WINAPI SynthCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
......@@ -87,42 +73,30 @@ static IClassFactoryImpl Synth_CF = {&SynthCF_Vtbl, 1 };
/******************************************************************
* DirectMusicSynthSink ClassFactory
*/
static HRESULT WINAPI SynthSinkCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
static HRESULT WINAPI SynthSinkCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI SynthSinkCF_AddRef(LPCLASSFACTORY iface)
{
static ULONG WINAPI SynthSinkCF_AddRef(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI SynthSinkCF_Release(LPCLASSFACTORY iface)
{
static ULONG WINAPI SynthSinkCF_Release(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI SynthSinkCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
static HRESULT WINAPI SynthSinkCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (riid, &IID_IDirectMusicSynthSink)) {
return DMUSIC_CreateDirectMusicSynthSink (riid, (LPDIRECTMUSICSYNTHSINK*)ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
return DMUSIC_CreateDirectMusicSynthSinkImpl (riid, ppobj, pOuter);
}
static HRESULT WINAPI SynthSinkCF_LockServer(LPCLASSFACTORY iface,BOOL dolock)
{
static HRESULT WINAPI SynthSinkCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
......@@ -144,15 +118,11 @@ static IClassFactoryImpl SynthSink_CF = {&SynthSinkCF_Vtbl, 1 };
*
*
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
if (fdwReason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
} else if (fdwReason == DLL_PROCESS_DETACH) {
/* FIXME: Cleanup */
}
......@@ -165,10 +135,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
*
*
*/
HRESULT WINAPI DMSYNTH_DllCanUnloadNow(void)
{
HRESULT WINAPI DMSYNTH_DllCanUnloadNow(void) {
FIXME("(void): stub\n");
return S_FALSE;
}
......@@ -178,8 +146,7 @@ HRESULT WINAPI DMSYNTH_DllCanUnloadNow(void)
*
*
*/
HRESULT WINAPI DMSYNTH_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
HRESULT WINAPI DMSYNTH_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) {
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (rclsid, &CLSID_DirectMusicSynth) && IsEqualIID (riid, &IID_IClassFactory)) {
*ppv = (LPVOID) &Synth_CF;
......
/* DirectMusicSynthesizer Private Include
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -23,16 +23,19 @@
#include <stdarg.h>
#include "windef.h"
#include "wine/debug.h"
#include "winbase.h"
#include "winnt.h"
#include "wingdi.h"
#include "dmusicc.h"
#include "winuser.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "wine/unicode.h"
#include "winreg.h"
#include "dmusici.h"
#include "dmusics.h"
#include "dmplugin.h"
#include "dmusicf.h"
#include "dsound.h"
#include "dmusics.h"
/*****************************************************************************
* Interfaces
......@@ -49,20 +52,13 @@ extern ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink_Vtbl;
/*****************************************************************************
* ClassFactory
*/
/* can support IID_IDirectMusicSynth and IID_IDirectMusicSynth8
* return always an IDirectMusicSynthImpl
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynth (LPCGUID lpcGUID, LPDIRECTMUSICSYNTH8* ppDMSynth, LPUNKNOWN pUnkOuter);
/* can support IID_IDirectMusicSynthSink
* return always an IDirectMusicSynthSinkImpl
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSink (LPCGUID lpcGUID, LPDIRECTMUSICSYNTHSINK* ppDMSynthSink, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSinkImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
/*****************************************************************************
* IDirectMusicSynth8Impl implementation structure
*/
struct IDirectMusicSynth8Impl
{
struct IDirectMusicSynth8Impl {
/* IUnknown fields */
ICOM_VFIELD(IDirectMusicSynth8);
DWORD ref;
......@@ -106,8 +102,7 @@ extern HRESULT WINAPI IDirectMusicSynth8Impl_AssignChannelToBuses (LPDIRECTMUSIC
/*****************************************************************************
* IDirectMusicSynthSinkImpl implementation structure
*/
struct IDirectMusicSynthSinkImpl
{
struct IDirectMusicSynthSinkImpl {
/* IUnknown fields */
ICOM_VFIELD(IDirectMusicSynthSink);
DWORD ref;
......
......@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
#include "dmsynth_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmsynth);
......@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmsynth);
/***********************************************************************
* interface for self-registering
*/
struct regsvr_interface
{
struct regsvr_interface {
IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */
......@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass
{
struct regsvr_coclass {
CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */
......@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/***********************************************************************
* register_interfaces
*/
static HRESULT register_interfaces(struct regsvr_interface const *list)
{
static HRESULT register_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -194,8 +177,7 @@ error_return:
/***********************************************************************
* unregister_interfaces
*/
static HRESULT unregister_interfaces(struct regsvr_interface const *list)
{
static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -219,8 +201,7 @@ error_return:
/***********************************************************************
* register_coclasses
*/
static HRESULT register_coclasses(struct regsvr_coclass const *list)
{
static HRESULT register_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -301,8 +282,7 @@ error_return:
/***********************************************************************
* unregister_coclasses
*/
static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
{
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -338,8 +318,7 @@ error_return:
/***********************************************************************
* regsvr_key_guid
*/
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
{
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
WCHAR buf[39];
StringFromGUID2(guid, buf, 39);
......@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW(
HKEY base,
WCHAR const *name,
WCHAR const *value)
{
WCHAR const *value) {
LONG res;
HKEY key;
......@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA(
HKEY base,
WCHAR const *name,
char const *value)
{
char const *value) {
LONG res;
HKEY key;
......@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid,
char const *curver_progid,
char const *name,
char const *extra)
{
char const *extra) {
LONG res;
HKEY progid_key;
......@@ -439,8 +415,7 @@ error_close_progid_key:
/***********************************************************************
* recursive_delete_key
*/
static LONG recursive_delete_key(HKEY key)
{
static LONG recursive_delete_key(HKEY key) {
LONG res;
WCHAR subkey_name[MAX_PATH];
DWORD cName;
......@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/***********************************************************************
* recursive_delete_keyA
*/
static LONG recursive_delete_keyA(HKEY base, char const *name)
{
static LONG recursive_delete_keyA(HKEY base, char const *name) {
LONG res;
HKEY key;
......@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/***********************************************************************
* recursive_delete_keyW
*/
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name)
{
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
LONG res;
HKEY key;
......@@ -534,8 +507,7 @@ static struct regsvr_interface const interface_list[] = {
/***********************************************************************
* DllRegisterServer (DMSYNTH.3)
*/
HRESULT WINAPI DMSYNTH_DllRegisterServer(void)
{
HRESULT WINAPI DMSYNTH_DllRegisterServer(void) {
HRESULT hr;
TRACE("\n");
......@@ -549,8 +521,7 @@ HRESULT WINAPI DMSYNTH_DllRegisterServer(void)
/***********************************************************************
* DllUnregisterServer (DMSYNTH.4)
*/
HRESULT WINAPI DMSYNTH_DllUnregisterServer(void)
{
HRESULT WINAPI DMSYNTH_DllUnregisterServer(void) {
HRESULT hr;
TRACE("\n");
......
/* IDirectMusicSynthSink Implementation
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmsynth_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmsynth);
/* IDirectMusicSynthSink IUnknown part: */
HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface (LPDIRECTMUSICSYNTHSINK iface, REFIID riid, LPVOID *ppobj)
{
/* IDirectMusicSynthSinkImpl IUnknown part: */
HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface (LPDIRECTMUSICSYNTHSINK iface, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) ||
......@@ -40,20 +31,17 @@ HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface (LPDIRECTMUSICSYNTHSINK
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicSynthSinkImpl_AddRef (LPDIRECTMUSICSYNTHSINK iface)
{
ULONG WINAPI IDirectMusicSynthSinkImpl_AddRef (LPDIRECTMUSICSYNTHSINK iface) {
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicSynthSinkImpl_Release (LPDIRECTMUSICSYNTHSINK iface)
{
ULONG WINAPI IDirectMusicSynthSinkImpl_Release (LPDIRECTMUSICSYNTHSINK iface) {
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
......@@ -63,81 +51,56 @@ ULONG WINAPI IDirectMusicSynthSinkImpl_Release (LPDIRECTMUSICSYNTHSINK iface)
return ref;
}
/* IDirectMusicSynth IDirectMusicSynth part: */
HRESULT WINAPI IDirectMusicSynthSinkImpl_Init (LPDIRECTMUSICSYNTHSINK iface, IDirectMusicSynth* pSynth)
{
/* IDirectMusicSynthSinkImpl IDirectMusicSynthSink part: */
HRESULT WINAPI IDirectMusicSynthSinkImpl_Init (LPDIRECTMUSICSYNTHSINK iface, IDirectMusicSynth* pSynth) {
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p): stub\n", This, pSynth);
return S_OK;
}
HRESULT WINAPI IDirectMusicSynthSinkImpl_SetMasterClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock* pClock)
{
HRESULT WINAPI IDirectMusicSynthSinkImpl_SetMasterClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock* pClock) {
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p): stub\n", This, pClock);
return S_OK;
}
HRESULT WINAPI IDirectMusicSynthSinkImpl_GetLatencyClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock** ppClock)
{
HRESULT WINAPI IDirectMusicSynthSinkImpl_GetLatencyClock (LPDIRECTMUSICSYNTHSINK iface, IReferenceClock** ppClock) {
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p): stub\n", This, ppClock);
return S_OK;
}
HRESULT WINAPI IDirectMusicSynthSinkImpl_Activate (LPDIRECTMUSICSYNTHSINK iface, BOOL fEnable)
{
HRESULT WINAPI IDirectMusicSynthSinkImpl_Activate (LPDIRECTMUSICSYNTHSINK iface, BOOL fEnable) {
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %d): stub\n", This, fEnable);
return S_OK;
}
HRESULT WINAPI IDirectMusicSynthSinkImpl_SampleToRefTime (LPDIRECTMUSICSYNTHSINK iface, LONGLONG llSampleTime, REFERENCE_TIME* prfTime)
{
HRESULT WINAPI IDirectMusicSynthSinkImpl_SampleToRefTime (LPDIRECTMUSICSYNTHSINK iface, LONGLONG llSampleTime, REFERENCE_TIME* prfTime) {
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %lli, %p): stub\n", This, llSampleTime, prfTime);
return S_OK;
}
HRESULT WINAPI IDirectMusicSynthSinkImpl_RefTimeToSample (LPDIRECTMUSICSYNTHSINK iface, REFERENCE_TIME rfTime, LONGLONG* pllSampleTime)
{
HRESULT WINAPI IDirectMusicSynthSinkImpl_RefTimeToSample (LPDIRECTMUSICSYNTHSINK iface, REFERENCE_TIME rfTime, LONGLONG* pllSampleTime) {
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %lli, %p): stub\n", This, rfTime, pllSampleTime );
return S_OK;
}
HRESULT WINAPI IDirectMusicSynthSinkImpl_SetDirectSound (LPDIRECTMUSICSYNTHSINK iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer)
{
HRESULT WINAPI IDirectMusicSynthSinkImpl_SetDirectSound (LPDIRECTMUSICSYNTHSINK iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer) {
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p, %p): stub\n", This, pDirectSound, pDirectSoundBuffer);
return S_OK;
}
HRESULT WINAPI IDirectMusicSynthSinkImpl_GetDesiredBufferSize (LPDIRECTMUSICSYNTHSINK iface, LPDWORD pdwBufferSizeInSamples)
{
HRESULT WINAPI IDirectMusicSynthSinkImpl_GetDesiredBufferSize (LPDIRECTMUSICSYNTHSINK iface, LPDWORD pdwBufferSizeInSamples) {
ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
FIXME("(%p, %p): stub\n", This, pdwBufferSizeInSamples);
return S_OK;
}
ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink_Vtbl =
{
ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicSynthSinkImpl_QueryInterface,
IDirectMusicSynthSinkImpl_AddRef,
......@@ -153,23 +116,17 @@ ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink_Vtbl =
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSink (LPCGUID lpcGUID, LPDIRECTMUSICSYNTHSINK* ppDMSynthSink, LPUNKNOWN pUnkOuter)
{
IDirectMusicSynthSinkImpl *dmsink;
TRACE("(%p,%p,%p)\n", lpcGUID, ppDMSynthSink, pUnkOuter);
if (IsEqualIID (lpcGUID, &IID_IDirectMusicSynthSink)) {
dmsink = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSynthSinkImpl));
if (NULL == dmsink) {
*ppDMSynthSink = (LPDIRECTMUSICSYNTHSINK) NULL;
HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSinkImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
IDirectMusicSynthSinkImpl *obj;
TRACE("(%p,%p,%p)\n", lpcGUID, ppobj, pUnkOuter);
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSynthSinkImpl));
if (NULL == obj) {
*ppobj = (LPDIRECTMUSICSYNTHSINK) NULL;
return E_OUTOFMEMORY;
}
dmsink->lpVtbl = &DirectMusicSynthSink_Vtbl;
dmsink->ref = 1;
*ppDMSynthSink = (LPDIRECTMUSICSYNTHSINK) dmsink;
return S_OK;
}
obj->lpVtbl = &DirectMusicSynthSink_Vtbl;
obj->ref = 0;
WARN("No interface found\n");
return E_NOINTERFACE;
return IDirectMusicSynthSinkImpl_QueryInterface((LPDIRECTMUSICSYNTHSINK)obj, lpcGUID, ppobj);
}
/*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Software Synthesizer"
#define WINE_FILENAME_STR "dmsynth.dll"
#define WINE_FILEVERSION 4,8,1,881
#define WINE_FILEVERSION_STR "4.8.1.881"
#define WINE_PRODUCTVERSION 4,8,1,881
#define WINE_PRODUCTVERSION_STR "4.8"
#define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc"
/* IDirectMusicBuffer Implementation
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -17,54 +17,30 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winuser.h"
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#include "mmsystem.h"
#include "winternl.h"
#include "mmddk.h"
#include "wine/windef16.h"
#include "wine/winbase16.h"
#include "wine/debug.h"
#include "dsound.h"
#include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicBuffer IUnknown parts follow: */
HRESULT WINAPI IDirectMusicBufferImpl_QueryInterface (LPDIRECTMUSICBUFFER iface, REFIID riid, LPVOID *ppobj)
{
/* IDirectMusicBufferImpl IUnknown part: */
HRESULT WINAPI IDirectMusicBufferImpl_QueryInterface (LPDIRECTMUSICBUFFER iface, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown)
|| IsEqualIID (riid, &IID_IDirectMusicBuffer)) {
IDirectMusicBufferImpl_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicBufferImpl_AddRef (LPDIRECTMUSICBUFFER iface)
{
ULONG WINAPI IDirectMusicBufferImpl_AddRef (LPDIRECTMUSICBUFFER iface) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicBufferImpl_Release (LPDIRECTMUSICBUFFER iface)
{
ULONG WINAPI IDirectMusicBufferImpl_Release (LPDIRECTMUSICBUFFER iface) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
......@@ -74,126 +50,86 @@ ULONG WINAPI IDirectMusicBufferImpl_Release (LPDIRECTMUSICBUFFER iface)
return ref;
}
/* IDirectMusicBuffer Interface follow: */
HRESULT WINAPI IDirectMusicBufferImpl_Flush (LPDIRECTMUSICBUFFER iface)
{
/* IDirectMusicBufferImpl IDirectMusicBuffer part: */
HRESULT WINAPI IDirectMusicBufferImpl_Flush (LPDIRECTMUSICBUFFER iface) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p): stub\n", This);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_TotalTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prtTime)
{
HRESULT WINAPI IDirectMusicBufferImpl_TotalTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prtTime) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, prtTime);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_PackStructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD dwChannelMessage)
{
HRESULT WINAPI IDirectMusicBufferImpl_PackStructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD dwChannelMessage) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %lli, %ld, %ld): stub\n", This, rt, dwChannelGroup, dwChannelMessage);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_PackUnstructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD cb, LPBYTE lpb)
{
HRESULT WINAPI IDirectMusicBufferImpl_PackUnstructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD cb, LPBYTE lpb) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %lli, %ld, %ld, %p): stub\n", This, rt, dwChannelGroup, cb, lpb);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_ResetReadPtr (LPDIRECTMUSICBUFFER iface)
{
HRESULT WINAPI IDirectMusicBufferImpl_ResetReadPtr (LPDIRECTMUSICBUFFER iface) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p): stub\n", This);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_GetNextEvent (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt, LPDWORD pdwChannelGroup, LPDWORD pdwLength, LPBYTE* ppData)
{
HRESULT WINAPI IDirectMusicBufferImpl_GetNextEvent (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt, LPDWORD pdwChannelGroup, LPDWORD pdwLength, LPBYTE* ppData) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p, %p, %p, %p): stub\n", This, prt, pdwChannelGroup, pdwLength, ppData);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_GetRawBufferPtr (LPDIRECTMUSICBUFFER iface, LPBYTE* ppData)
{
HRESULT WINAPI IDirectMusicBufferImpl_GetRawBufferPtr (LPDIRECTMUSICBUFFER iface, LPBYTE* ppData) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, ppData);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_GetStartTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt)
{
HRESULT WINAPI IDirectMusicBufferImpl_GetStartTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, prt);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_GetUsedBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb)
{
HRESULT WINAPI IDirectMusicBufferImpl_GetUsedBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, pcb);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_GetMaxBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb)
{
HRESULT WINAPI IDirectMusicBufferImpl_GetMaxBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, pcb);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_GetBufferFormat (LPDIRECTMUSICBUFFER iface, LPGUID pGuidFormat)
{
HRESULT WINAPI IDirectMusicBufferImpl_GetBufferFormat (LPDIRECTMUSICBUFFER iface, LPGUID pGuidFormat) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %p): stub\n", This, pGuidFormat);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_SetStartTime (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt)
{
HRESULT WINAPI IDirectMusicBufferImpl_SetStartTime (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %lli): stub\n", This, rt);
return S_OK;
}
HRESULT WINAPI IDirectMusicBufferImpl_SetUsedBytes (LPDIRECTMUSICBUFFER iface, DWORD cb)
{
HRESULT WINAPI IDirectMusicBufferImpl_SetUsedBytes (LPDIRECTMUSICBUFFER iface, DWORD cb) {
ICOM_THIS(IDirectMusicBufferImpl,iface);
FIXME("(%p, %ld): stub\n", This, cb);
return S_OK;
}
ICOM_VTABLE(IDirectMusicBuffer) DirectMusicBuffer_Vtbl =
{
ICOM_VTABLE(IDirectMusicBuffer) DirectMusicBuffer_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicBufferImpl_QueryInterface,
IDirectMusicBufferImpl_AddRef,
......@@ -214,13 +150,16 @@ ICOM_VTABLE(IDirectMusicBuffer) DirectMusicBuffer_Vtbl =
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicBuffer (LPCGUID lpcGUID, LPDIRECTMUSICBUFFER* ppDMBuff, LPUNKNOWN pUnkOuter)
{
if (IsEqualIID (lpcGUID, &IID_IDirectMusicBuffer)) {
FIXME("Not yet\n");
return E_NOINTERFACE;
HRESULT WINAPI DMUSIC_CreateDirectMusicBufferImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
IDirectMusicBufferImpl* dmbuff;
dmbuff = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBufferImpl));
if (NULL == dmbuff) {
*ppobj = (LPVOID) NULL;
return E_OUTOFMEMORY;
}
dmbuff->lpVtbl = &DirectMusicBuffer_Vtbl;
dmbuff->ref = 0; /* will be inited by QueryInterface */
WARN("No interface found\n");
return E_NOINTERFACE;
return IDirectMusicBufferImpl_QueryInterface ((LPDIRECTMUSICBUFFER)dmbuff, lpcGUID, ppobj);
}
/* IReferenceClock Implementation
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IReferenceClock IUnknown parts follow: */
HRESULT WINAPI IReferenceClockImpl_QueryInterface (IReferenceClock *iface, REFIID riid, LPVOID *ppobj)
{
/* IReferenceClockImpl IUnknown part: */
HRESULT WINAPI IReferenceClockImpl_QueryInterface (IReferenceClock *iface, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IReferenceClockImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) ||
......@@ -40,20 +31,17 @@ HRESULT WINAPI IReferenceClockImpl_QueryInterface (IReferenceClock *iface, REFII
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IReferenceClockImpl_AddRef (IReferenceClock *iface)
{
ULONG WINAPI IReferenceClockImpl_AddRef (IReferenceClock *iface) {
ICOM_THIS(IReferenceClockImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IReferenceClockImpl_Release (IReferenceClock *iface)
{
ULONG WINAPI IReferenceClockImpl_Release (IReferenceClock *iface) {
ICOM_THIS(IReferenceClockImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
......@@ -63,46 +51,33 @@ ULONG WINAPI IReferenceClockImpl_Release (IReferenceClock *iface)
return ref;
}
/* IReferenceClock Interface follow: */
HRESULT WINAPI IReferenceClockImpl_GetTime (IReferenceClock *iface, REFERENCE_TIME* pTime)
{
/* IReferenceClockImpl IReferenceClock part: */
HRESULT WINAPI IReferenceClockImpl_GetTime (IReferenceClock *iface, REFERENCE_TIME* pTime) {
ICOM_THIS(IReferenceClockImpl,iface);
TRACE("(%p, %p)\n", This, pTime);
*pTime = This->rtTime;
return S_OK;
}
HRESULT WINAPI IReferenceClockImpl_AdviseTime (IReferenceClock *iface, REFERENCE_TIME baseTime, REFERENCE_TIME streamTime, HANDLE hEvent, DWORD* pdwAdviseCookie)
{
HRESULT WINAPI IReferenceClockImpl_AdviseTime (IReferenceClock *iface, REFERENCE_TIME baseTime, REFERENCE_TIME streamTime, HANDLE hEvent, DWORD* pdwAdviseCookie) {
ICOM_THIS(IReferenceClockImpl,iface);
FIXME("(%p, %lli, %lli, %p, %p): stub\n", This, baseTime, streamTime, hEvent, pdwAdviseCookie);
return S_OK;
}
HRESULT WINAPI IReferenceClockImpl_AdvisePeriodic (IReferenceClock *iface, REFERENCE_TIME startTime, REFERENCE_TIME periodTime, HANDLE hSemaphore, DWORD* pdwAdviseCookie)
{
HRESULT WINAPI IReferenceClockImpl_AdvisePeriodic (IReferenceClock *iface, REFERENCE_TIME startTime, REFERENCE_TIME periodTime, HANDLE hSemaphore, DWORD* pdwAdviseCookie) {
ICOM_THIS(IReferenceClockImpl,iface);
FIXME("(%p, %lli, %lli, %p, %p): stub\n", This, startTime, periodTime, hSemaphore, pdwAdviseCookie);
return S_OK;
}
HRESULT WINAPI IReferenceClockImpl_Unadvise (IReferenceClock *iface, DWORD dwAdviseCookie)
{
HRESULT WINAPI IReferenceClockImpl_Unadvise (IReferenceClock *iface, DWORD dwAdviseCookie) {
ICOM_THIS(IReferenceClockImpl,iface);
FIXME("(%p, %ld): stub\n", This, dwAdviseCookie);
return S_OK;
}
ICOM_VTABLE(IReferenceClock) ReferenceClock_Vtbl =
{
ICOM_VTABLE(IReferenceClock) ReferenceClock_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IReferenceClockImpl_QueryInterface,
IReferenceClockImpl_AddRef,
......@@ -114,26 +89,18 @@ ICOM_VTABLE(IReferenceClock) ReferenceClock_Vtbl =
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateReferenceClock (LPCGUID lpcGUID, IReferenceClock** ppRC, LPUNKNOWN pUnkOuter)
{
HRESULT WINAPI DMUSIC_CreateReferenceClockImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
IReferenceClockImpl* clock;
if (IsEqualIID (lpcGUID, &IID_IReferenceClock))
{
clock = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IReferenceClockImpl));
if (NULL == clock) {
*ppRC = NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
clock->lpVtbl = &ReferenceClock_Vtbl;
clock->ref = 1;
clock->ref = 0; /* will be inited by QueryInterface */
clock->rtTime = 0;
clock->pClockInfo.dwSize = sizeof (DMUS_CLOCKINFO);
*ppRC = (IReferenceClock *) clock;
return S_OK;
}
WARN("No interface found\n");
return E_NOINTERFACE;
return IReferenceClockImpl_QueryInterface ((IReferenceClock *)clock, lpcGUID, ppobj);
}
/* IDirectMusic8 Implementation
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -16,33 +16,16 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winuser.h"
#include "wingdi.h"
#include "winerror.h"
#include "mmsystem.h"
#include "winternl.h"
#include "mmddk.h"
#include "wine/windef16.h"
#include "wine/winbase16.h"
#include "wine/debug.h"
#include "dsound.h"
#include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusic8 IUnknown parts follow: */
HRESULT WINAPI IDirectMusic8Impl_QueryInterface (LPDIRECTMUSIC8 iface, REFIID riid, LPVOID *ppobj)
{
/* IDirectMusic8Impl IUnknown part: */
HRESULT WINAPI IDirectMusic8Impl_QueryInterface (LPDIRECTMUSIC8 iface, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IDirectMusic8Impl,iface);
if (IsEqualIID (riid, &IID_IUnknown) ||
IsEqualIID (riid, &IID_IDirectMusic) ||
IsEqualIID (riid, &IID_IDirectMusic2) ||
IsEqualIID (riid, &IID_IDirectMusic8)) {
IDirectMusic8Impl_AddRef(iface);
......@@ -54,15 +37,13 @@ HRESULT WINAPI IDirectMusic8Impl_QueryInterface (LPDIRECTMUSIC8 iface, REFIID ri
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusic8Impl_AddRef (LPDIRECTMUSIC8 iface)
{
ULONG WINAPI IDirectMusic8Impl_AddRef (LPDIRECTMUSIC8 iface) {
ICOM_THIS(IDirectMusic8Impl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusic8Impl_Release (LPDIRECTMUSIC8 iface)
{
ULONG WINAPI IDirectMusic8Impl_Release (LPDIRECTMUSIC8 iface) {
ICOM_THIS(IDirectMusic8Impl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
......@@ -72,9 +53,8 @@ ULONG WINAPI IDirectMusic8Impl_Release (LPDIRECTMUSIC8 iface)
return ref;
}
/* IDirectMusic8 Interface follow: */
HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps)
{
/* IDirectMusic8Impl IDirectMusic part: */
HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps) {
ICOM_THIS(IDirectMusic8Impl,iface);
TRACE("(%p, %ld, %p)\n", This, dwIndex, pPortCaps);
......@@ -115,17 +95,13 @@ HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD dwIndex, L
return S_FALSE;
}
HRESULT WINAPI IDirectMusic8Impl_CreateMusicBuffer (LPDIRECTMUSIC8 iface, LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER** ppBuffer, LPUNKNOWN pUnkOuter)
{
HRESULT WINAPI IDirectMusic8Impl_CreateMusicBuffer (LPDIRECTMUSIC8 iface, LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER** ppBuffer, LPUNKNOWN pUnkOuter) {
ICOM_THIS(IDirectMusic8Impl,iface);
FIXME("(%p, %p, %p, %p): stub\n", This, pBufferDesc, ppBuffer, pUnkOuter);
return S_OK;
}
HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT* ppPort, LPUNKNOWN pUnkOuter)
{
HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT* ppPort, LPUNKNOWN pUnkOuter) {
ICOM_THIS(IDirectMusic8Impl,iface);
int i/*, j*/;
DMUS_PORTCAPS PortCaps;
......@@ -145,7 +121,7 @@ HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLSID rcls
This->ppPorts[This->nrofports]->pCaps = &PortCaps;
This->ppPorts[This->nrofports]->pParams = pPortParams; /* this one is here just because there's a funct. which retrieves it back */
This->ppPorts[This->nrofports]->pDirectSound = NULL;
DMUSIC_CreateReferenceClock (&IID_IReferenceClock, (IReferenceClock**)&This->ppPorts[This->nrofports]->pLatencyClock, NULL);
DMUSIC_CreateReferenceClockImpl (&IID_IReferenceClock, (LPVOID*)&This->ppPorts[This->nrofports]->pLatencyClock, NULL);
#if 0
if (pPortParams->dwValidParams & DMUS_PORTPARAMS_CHANNELGROUPS) {
......@@ -181,17 +157,13 @@ HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLSID rcls
return E_NOINTERFACE;
}
HRESULT WINAPI IDirectMusic8Impl_EnumMasterClock (LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo)
{
HRESULT WINAPI IDirectMusic8Impl_EnumMasterClock (LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo) {
ICOM_THIS(IDirectMusic8Impl,iface);
FIXME("(%p, %ld, %p): stub\n", This, dwIndex, lpClockInfo);
return S_FALSE;
}
HRESULT WINAPI IDirectMusic8Impl_GetMasterClock (LPDIRECTMUSIC8 iface, LPGUID pguidClock, IReferenceClock** ppReferenceClock)
{
HRESULT WINAPI IDirectMusic8Impl_GetMasterClock (LPDIRECTMUSIC8 iface, LPGUID pguidClock, IReferenceClock** ppReferenceClock) {
ICOM_THIS(IDirectMusic8Impl,iface);
TRACE("(%p, %p, %p)\n", This, pguidClock, ppReferenceClock);
......@@ -203,31 +175,25 @@ HRESULT WINAPI IDirectMusic8Impl_GetMasterClock (LPDIRECTMUSIC8 iface, LPGUID pg
return S_OK;
}
HRESULT WINAPI IDirectMusic8Impl_SetMasterClock (LPDIRECTMUSIC8 iface, REFGUID rguidClock)
{
HRESULT WINAPI IDirectMusic8Impl_SetMasterClock (LPDIRECTMUSIC8 iface, REFGUID rguidClock) {
ICOM_THIS(IDirectMusic8Impl,iface);
FIXME("(%p, %s): stub\n", This, debugstr_guid(rguidClock));
return S_OK;
}
HRESULT WINAPI IDirectMusic8Impl_Activate (LPDIRECTMUSIC8 iface, BOOL fEnable)
{
HRESULT WINAPI IDirectMusic8Impl_Activate (LPDIRECTMUSIC8 iface, BOOL fEnable) {
ICOM_THIS(IDirectMusic8Impl,iface);
int i;
FIXME("(%p, %d): stub\n", This, fEnable);
for (i = 0; i < This->nrofports; i++)
{
for (i = 0; i < This->nrofports; i++) {
This->ppPorts[i]->fActive = fEnable;
}
return S_OK;
}
HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort (LPDIRECTMUSIC8 iface, LPGUID pguidPort)
{
HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort (LPDIRECTMUSIC8 iface, LPGUID pguidPort) {
ICOM_THIS(IDirectMusic8Impl,iface);
HKEY hkGUID;
DWORD returnTypeGUID, sizeOfReturnBuffer = 50;
......@@ -251,26 +217,19 @@ HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort (LPDIRECTMUSIC8 iface, LPGUID pg
return S_OK;
}
HRESULT WINAPI IDirectMusic8Impl_SetDirectSound (LPDIRECTMUSIC8 iface, LPDIRECTSOUND pDirectSound, HWND hWnd)
{
HRESULT WINAPI IDirectMusic8Impl_SetDirectSound (LPDIRECTMUSIC8 iface, LPDIRECTSOUND pDirectSound, HWND hWnd) {
ICOM_THIS(IDirectMusic8Impl,iface);
FIXME("(%p, %p, %p): stub\n", This, pDirectSound, hWnd);
return S_OK;
}
HRESULT WINAPI IDirectMusic8Impl_SetExternalMasterClock (LPDIRECTMUSIC8 iface, IReferenceClock* pClock)
{
HRESULT WINAPI IDirectMusic8Impl_SetExternalMasterClock (LPDIRECTMUSIC8 iface, IReferenceClock* pClock) {
ICOM_THIS(IDirectMusic8Impl,iface);
FIXME("(%p, %p): stub\n", This, pClock);
return S_OK;
}
ICOM_VTABLE(IDirectMusic8) DirectMusic8_Vtbl =
{
ICOM_VTABLE(IDirectMusic8) DirectMusic8_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusic8Impl_QueryInterface,
IDirectMusic8Impl_AddRef,
......@@ -288,8 +247,7 @@ ICOM_VTABLE(IDirectMusic8) DirectMusic8_Vtbl =
};
/* helper stuff */
void register_waveport (LPGUID lpGUID, LPCSTR lpszDesc, LPCSTR lpszDrvName, LPVOID lpContext)
{
void register_waveport (LPGUID lpGUID, LPCSTR lpszDesc, LPCSTR lpszDrvName, LPVOID lpContext) {
LPDMUS_PORTCAPS pPortCaps = (LPDMUS_PORTCAPS)lpContext;
pPortCaps->dwSize = sizeof(DMUS_PORTCAPS);
......@@ -306,30 +264,22 @@ void register_waveport (LPGUID lpGUID, LPCSTR lpszDesc, LPCSTR lpszDrvName, LPVO
}
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusic (LPCGUID lpcGUID, LPDIRECTMUSIC8 *ppDM, LPUNKNOWN pUnkOuter)
{
HRESULT WINAPI DMUSIC_CreateDirectMusicImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
IDirectMusic8Impl *dmusic;
TRACE("(%p,%p,%p)\n",lpcGUID, ppDM, pUnkOuter);
if (IsEqualIID (lpcGUID, &IID_IDirectMusic) ||
IsEqualIID (lpcGUID, &IID_IDirectMusic2) ||
IsEqualIID (lpcGUID, &IID_IDirectMusic8)) {
TRACE("(%p,%p,%p)\n",lpcGUID, ppobj, pUnkOuter);
dmusic = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusic8Impl));
if (NULL == dmusic) {
*ppDM = (LPDIRECTMUSIC8) NULL;
*ppobj = (LPDIRECTMUSIC8) NULL;
return E_OUTOFMEMORY;
}
dmusic->lpVtbl = &DirectMusic8_Vtbl;
dmusic->ref = 1;
dmusic->ref = 0; /* will be inited with QueryInterface */
dmusic->pMasterClock = NULL;
dmusic->ppPorts = NULL;
dmusic->nrofports = 0;
DMUSIC_CreateReferenceClock (&IID_IReferenceClock, (IReferenceClock**)&dmusic->pMasterClock, NULL);
DMUSIC_CreateReferenceClockImpl (&IID_IReferenceClock, (LPVOID*)&dmusic->pMasterClock, NULL);
*ppDM = (LPDIRECTMUSIC8) dmusic;
return S_OK;
}
WARN("No interface found\n");
return E_NOINTERFACE;
return IDirectMusic8Impl_QueryInterface ((LPDIRECTMUSIC8)dmusic, lpcGUID, ppobj);
}
/* DirectMusic Main
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -21,8 +21,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
typedef struct
{
typedef struct {
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
......@@ -31,44 +30,30 @@ typedef struct
/******************************************************************
* DirectMusic ClassFactory
*/
static HRESULT WINAPI DirectMusicCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
static HRESULT WINAPI DirectMusicCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI DirectMusicCF_AddRef(LPCLASSFACTORY iface)
{
static ULONG WINAPI DirectMusicCF_AddRef(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI DirectMusicCF_Release(LPCLASSFACTORY iface)
{
static ULONG WINAPI DirectMusicCF_Release(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI DirectMusicCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
static HRESULT WINAPI DirectMusicCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (riid, &IID_IDirectMusic) ||
IsEqualIID (riid, &IID_IDirectMusic2) ||
IsEqualIID (riid, &IID_IDirectMusic8)) {
return DMUSIC_CreateDirectMusic (riid, (LPDIRECTMUSIC8*) ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
return DMUSIC_CreateDirectMusicImpl (riid, (LPVOID*) ppobj, pOuter);
}
static HRESULT WINAPI DirectMusicCF_LockServer(LPCLASSFACTORY iface,BOOL dolock)
{
static HRESULT WINAPI DirectMusicCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
......@@ -88,44 +73,30 @@ static IClassFactoryImpl DirectMusic_CF = {&DirectMusicCF_Vtbl, 1 };
/******************************************************************
* DirectMusicCollection ClassFactory
*/
static HRESULT WINAPI CollectionCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
static HRESULT WINAPI CollectionCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI CollectionCF_AddRef(LPCLASSFACTORY iface)
{
static ULONG WINAPI CollectionCF_AddRef(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI CollectionCF_Release(LPCLASSFACTORY iface)
{
static ULONG WINAPI CollectionCF_Release(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI CollectionCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
static HRESULT WINAPI CollectionCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
if (IsEqualIID (riid, &IID_IDirectMusicCollection)) {
return DMUSIC_CreateDirectMusicCollection (riid, (LPDIRECTMUSICCOLLECTION*)ppobj, pOuter);
} else if (IsEqualIID (riid, &IID_IDirectMusicObject)) {
return DMUSIC_CreateDirectMusicCollectionObject (riid, (LPDIRECTMUSICOBJECT*)ppobj, pOuter);
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
return DMUSIC_CreateDirectMusicCollectionImpl (riid, ppobj, pOuter);
}
static HRESULT WINAPI CollectionCF_LockServer(LPCLASSFACTORY iface,BOOL dolock)
{
static HRESULT WINAPI CollectionCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
......@@ -147,15 +118,11 @@ static IClassFactoryImpl Collection_CF = {&CollectionCF_Vtbl, 1 };
*
*
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
if (fdwReason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
} else if (fdwReason == DLL_PROCESS_DETACH) {
/* FIXME: Cleanup */
}
......@@ -168,10 +135,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
*
*
*/
HRESULT WINAPI DMUSIC_DllCanUnloadNow(void)
{
HRESULT WINAPI DMUSIC_DllCanUnloadNow(void) {
FIXME("(void): stub\n");
return S_FALSE;
}
......@@ -181,8 +146,7 @@ HRESULT WINAPI DMUSIC_DllCanUnloadNow(void)
*
*
*/
HRESULT WINAPI DMUSIC_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
HRESULT WINAPI DMUSIC_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) {
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (rclsid, &CLSID_DirectMusic) && IsEqualIID (riid, &IID_IClassFactory)) {
*ppv = (LPVOID) &DirectMusic_CF;
......
/* IDirectMusicDownload Implementation
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -17,30 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winuser.h"
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#include "mmsystem.h"
#include "winternl.h"
#include "mmddk.h"
#include "wine/windef16.h"
#include "wine/winbase16.h"
#include "wine/debug.h"
#include "dsound.h"
#include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicDownload IUnknown parts follow: */
HRESULT WINAPI IDirectMusicDownloadImpl_QueryInterface (LPDIRECTMUSICDOWNLOAD iface, REFIID riid, LPVOID *ppobj)
{
/* IDirectMusicDownloadImpl IUnknown part: */
HRESULT WINAPI IDirectMusicDownloadImpl_QueryInterface (LPDIRECTMUSICDOWNLOAD iface, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IDirectMusicDownloadImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown)
......@@ -49,20 +31,17 @@ HRESULT WINAPI IDirectMusicDownloadImpl_QueryInterface (LPDIRECTMUSICDOWNLOAD if
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicDownloadImpl_AddRef (LPDIRECTMUSICDOWNLOAD iface)
{
ULONG WINAPI IDirectMusicDownloadImpl_AddRef (LPDIRECTMUSICDOWNLOAD iface) {
ICOM_THIS(IDirectMusicDownloadImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicDownloadImpl_Release (LPDIRECTMUSICDOWNLOAD iface)
{
ULONG WINAPI IDirectMusicDownloadImpl_Release (LPDIRECTMUSICDOWNLOAD iface) {
ICOM_THIS(IDirectMusicDownloadImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
......@@ -72,18 +51,14 @@ ULONG WINAPI IDirectMusicDownloadImpl_Release (LPDIRECTMUSICDOWNLOAD iface)
return ref;
}
/* IDirectMusicDownload Interface follow: */
HRESULT WINAPI IDirectMusicDownloadImpl_GetBuffer (LPDIRECTMUSICDOWNLOAD iface, void** ppvBuffer, DWORD* pdwSize)
{
/* IDirectMusicDownloadImpl IDirectMusicDownload part: */
HRESULT WINAPI IDirectMusicDownloadImpl_GetBuffer (LPDIRECTMUSICDOWNLOAD iface, void** ppvBuffer, DWORD* pdwSize) {
ICOM_THIS(IDirectMusicDownloadImpl,iface);
FIXME("(%p,%p, %p): stub\n", This, ppvBuffer, pdwSize);
return S_OK;
}
ICOM_VTABLE(IDirectMusicDownload) DirectMusicDownload_Vtbl =
{
ICOM_VTABLE(IDirectMusicDownload) DirectMusicDownload_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicDownloadImpl_QueryInterface,
IDirectMusicDownloadImpl_AddRef,
......@@ -92,13 +67,16 @@ ICOM_VTABLE(IDirectMusicDownload) DirectMusicDownload_Vtbl =
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicDownload (LPCGUID lpcGUID, LPDIRECTMUSICDOWNLOAD* ppDMDL, LPUNKNOWN pUnkOuter)
{
if (IsEqualIID (lpcGUID, &IID_IDirectMusicDownload)) {
FIXME("Not yet\n");
return E_NOINTERFACE;
HRESULT WINAPI DMUSIC_CreateDirectMusicDownloadImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
IDirectMusicDownloadImpl* dmdl;
dmdl = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicDownloadImpl));
if (NULL == dmdl) {
*ppobj = (LPVOID) NULL;
return E_OUTOFMEMORY;
}
dmdl->lpVtbl = &DirectMusicDownload_Vtbl;
dmdl->ref = 0; /* will be inited by QueryInterface */
WARN("No interface found\n");
return E_NOINTERFACE;
return IDirectMusicDownloadImpl_QueryInterface ((LPDIRECTMUSICDOWNLOAD)dmdl, lpcGUID, ppobj);
}
/* IDirectMusicDownloadedInstrument Implementation
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicDownloadedInstrument IUnknown parts follow: */
HRESULT WINAPI IDirectMusicDownloadedInstrumentImpl_QueryInterface (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface, REFIID riid, LPVOID *ppobj)
{
/* IDirectMusicDownloadedInstrumentImpl IUnknown part: */
HRESULT WINAPI IDirectMusicDownloadedInstrumentImpl_QueryInterface (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IDirectMusicDownloadedInstrumentImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown)
......@@ -40,20 +31,17 @@ HRESULT WINAPI IDirectMusicDownloadedInstrumentImpl_QueryInterface (LPDIRECTMUSI
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_AddRef (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface)
{
ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_AddRef (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface) {
ICOM_THIS(IDirectMusicDownloadedInstrumentImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_Release (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface)
{
ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_Release (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface) {
ICOM_THIS(IDirectMusicDownloadedInstrumentImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
......@@ -63,11 +51,10 @@ ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_Release (LPDIRECTMUSICDOWNLOAD
return ref;
}
/* IDirectMusicDownloadedInstrument Interface follow: */
/* IDirectMusicDownloadedInstrumentImpl IDirectMusicDownloadedInstrument part: */
/* none at this time */
ICOM_VTABLE(IDirectMusicDownloadedInstrument) DirectMusicDownloadedInstrument_Vtbl =
{
ICOM_VTABLE(IDirectMusicDownloadedInstrument) DirectMusicDownloadedInstrument_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicDownloadedInstrumentImpl_QueryInterface,
IDirectMusicDownloadedInstrumentImpl_AddRef,
......@@ -75,13 +62,16 @@ ICOM_VTABLE(IDirectMusicDownloadedInstrument) DirectMusicDownloadedInstrument_Vt
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicDownloadedInstrument (LPCGUID lpcGUID, LPDIRECTMUSICDOWNLOADEDINSTRUMENT* ppDMDLInstrument, LPUNKNOWN pUnkOuter)
{
if (IsEqualIID (lpcGUID, &IID_IDirectMusicDownloadedInstrument)) {
FIXME("Not yet\n");
return E_NOINTERFACE;
HRESULT WINAPI DMUSIC_CreateDirectMusicDownloadedInstrumentImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
IDirectMusicDownloadedInstrumentImpl* dmdlinst;
dmdlinst = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicDownloadedInstrumentImpl));
if (NULL == dmdlinst) {
*ppobj = (LPVOID) NULL;
return E_OUTOFMEMORY;
}
dmdlinst->lpVtbl = &DirectMusicDownloadedInstrument_Vtbl;
dmdlinst->ref = 0; /* will be inited by QueryInterface */
WARN("No interface found\n");
return E_NOINTERFACE;
return IDirectMusicDownloadedInstrumentImpl_QueryInterface ((LPDIRECTMUSICDOWNLOADEDINSTRUMENT)dmdlinst, lpcGUID, ppobj);
}
/* IDirectMusicPort Implementation
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicPort IUnknown parts follow: */
HRESULT WINAPI IDirectMusicPortImpl_QueryInterface (LPDIRECTMUSICPORT iface, REFIID riid, LPVOID *ppobj)
{
/* IDirectMusicPortImpl IUnknown part: */
HRESULT WINAPI IDirectMusicPortImpl_QueryInterface (LPDIRECTMUSICPORT iface, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IDirectMusicPortImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPort)) {
......@@ -39,20 +30,17 @@ HRESULT WINAPI IDirectMusicPortImpl_QueryInterface (LPDIRECTMUSICPORT iface, REF
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicPortImpl_AddRef (LPDIRECTMUSICPORT iface)
{
ULONG WINAPI IDirectMusicPortImpl_AddRef (LPDIRECTMUSICPORT iface) {
ICOM_THIS(IDirectMusicPortImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicPortImpl_Release (LPDIRECTMUSICPORT iface)
{
ULONG WINAPI IDirectMusicPortImpl_Release (LPDIRECTMUSICPORT iface) {
ICOM_THIS(IDirectMusicPortImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
......@@ -62,166 +50,121 @@ ULONG WINAPI IDirectMusicPortImpl_Release (LPDIRECTMUSICPORT iface)
return ref;
}
/* IDirectMusicPort Interface follow: */
HRESULT WINAPI IDirectMusicPortImpl_PlayBuffer (LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER pBuffer)
{
/* IDirectMusicPortImpl IDirectMusicPort part: */
HRESULT WINAPI IDirectMusicPortImpl_PlayBuffer (LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER pBuffer) {
ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p): stub\n", This, pBuffer);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_SetReadNotificationHandle (LPDIRECTMUSICPORT iface, HANDLE hEvent)
{
HRESULT WINAPI IDirectMusicPortImpl_SetReadNotificationHandle (LPDIRECTMUSICPORT iface, HANDLE hEvent) {
ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p): stub\n", This, hEvent);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_Read (LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER pBuffer)
{
HRESULT WINAPI IDirectMusicPortImpl_Read (LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER pBuffer) {
ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p): stub\n", This, pBuffer);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_DownloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicInstrument* pInstrument, IDirectMusicDownloadedInstrument** ppDownloadedInstrument, DMUS_NOTERANGE* pNoteRanges, DWORD dwNumNoteRanges)
{
HRESULT WINAPI IDirectMusicPortImpl_DownloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicInstrument* pInstrument, IDirectMusicDownloadedInstrument** ppDownloadedInstrument, DMUS_NOTERANGE* pNoteRanges, DWORD dwNumNoteRanges) {
ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p, %p, %p, %ld): stub\n", This, pInstrument, ppDownloadedInstrument, pNoteRanges, dwNumNoteRanges);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_UnloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicDownloadedInstrument *pDownloadedInstrument)
{
HRESULT WINAPI IDirectMusicPortImpl_UnloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicDownloadedInstrument *pDownloadedInstrument) {
ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p): stub\n", This, pDownloadedInstrument);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_GetLatencyClock (LPDIRECTMUSICPORT iface, IReferenceClock** ppClock)
{
HRESULT WINAPI IDirectMusicPortImpl_GetLatencyClock (LPDIRECTMUSICPORT iface, IReferenceClock** ppClock) {
ICOM_THIS(IDirectMusicPortImpl,iface);
TRACE("(%p, %p)\n", This, ppClock);
*ppClock = This->pLatencyClock;
IReferenceClock_AddRef (*ppClock);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_GetRunningStats (LPDIRECTMUSICPORT iface, LPDMUS_SYNTHSTATS pStats)
{
HRESULT WINAPI IDirectMusicPortImpl_GetRunningStats (LPDIRECTMUSICPORT iface, LPDMUS_SYNTHSTATS pStats) {
ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p): stub\n", This, pStats);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_GetCaps (LPDIRECTMUSICPORT iface, LPDMUS_PORTCAPS pPortCaps)
{
HRESULT WINAPI IDirectMusicPortImpl_Compact (LPDIRECTMUSICPORT iface) {
ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p): stub\n", This);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_GetCaps (LPDIRECTMUSICPORT iface, LPDMUS_PORTCAPS pPortCaps) {
ICOM_THIS(IDirectMusicPortImpl,iface);
TRACE("(%p, %p)\n", This, pPortCaps);
pPortCaps = This->pCaps;
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_DeviceIoControl (LPDIRECTMUSICPORT iface, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped)
{
HRESULT WINAPI IDirectMusicPortImpl_DeviceIoControl (LPDIRECTMUSICPORT iface, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped) {
ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %ld, %p, %ld, %p, %ld, %p, %p): stub\n", This, dwIoControlCode, lpInBuffer, nInBufferSize, lpOutBuffer, nOutBufferSize, lpBytesReturned, lpOverlapped);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_SetNumChannelGroups (LPDIRECTMUSICPORT iface, DWORD dwChannelGroups)
{
HRESULT WINAPI IDirectMusicPortImpl_SetNumChannelGroups (LPDIRECTMUSICPORT iface, DWORD dwChannelGroups) {
ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %ld): semi-stub\n", This, dwChannelGroups);
This->nrofgroups = dwChannelGroups;
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_GetNumChannelGroups (LPDIRECTMUSICPORT iface, LPDWORD pdwChannelGroups)
{
HRESULT WINAPI IDirectMusicPortImpl_GetNumChannelGroups (LPDIRECTMUSICPORT iface, LPDWORD pdwChannelGroups) {
ICOM_THIS(IDirectMusicPortImpl,iface);
TRACE("(%p, %p)\n", This, pdwChannelGroups);
*pdwChannelGroups = This->nrofgroups;
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_Activate (LPDIRECTMUSICPORT iface, BOOL fActive)
{
HRESULT WINAPI IDirectMusicPortImpl_Activate (LPDIRECTMUSICPORT iface, BOOL fActive) {
ICOM_THIS(IDirectMusicPortImpl,iface);
TRACE("(%p, %d)\n", This, fActive);
This->fActive = fActive;
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_SetChannelPriority (LPDIRECTMUSICPORT iface, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority)
{
HRESULT WINAPI IDirectMusicPortImpl_SetChannelPriority (LPDIRECTMUSICPORT iface, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority) {
ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %ld, %ld, %ld): semi-stub\n", This, dwChannelGroup, dwChannel, dwPriority);
if (dwChannel > 16)
{
if (dwChannel > 16) {
WARN("isn't there supposed to be 16 channels (no. %ld requested)?! (faking as it is ok)\n", dwChannel);
/*return E_INVALIDARG;*/
}
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_GetChannelPriority (LPDIRECTMUSICPORT iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority)
{
HRESULT WINAPI IDirectMusicPortImpl_GetChannelPriority (LPDIRECTMUSICPORT iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority) {
ICOM_THIS(IDirectMusicPortImpl,iface);
TRACE("(%p, %ld, %ld, %p)\n", This, dwChannelGroup, dwChannel, pdwPriority);
*pdwPriority = This->group[dwChannelGroup-1].channel[dwChannel].priority;
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_SetDirectSound (LPDIRECTMUSICPORT iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer)
{
HRESULT WINAPI IDirectMusicPortImpl_SetDirectSound (LPDIRECTMUSICPORT iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer) {
ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p, %p): stub\n", This, pDirectSound, pDirectSoundBuffer);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortImpl_GetFormat (LPDIRECTMUSICPORT iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize)
{
HRESULT WINAPI IDirectMusicPortImpl_GetFormat (LPDIRECTMUSICPORT iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize) {
ICOM_THIS(IDirectMusicPortImpl,iface);
FIXME("(%p, %p, %p, %p): stub\n", This, pWaveFormatEx, pdwWaveFormatExSize, pdwBufferSize);
return S_OK;
}
ICOM_VTABLE(IDirectMusicPort) DirectMusicPort_Vtbl =
{
ICOM_VTABLE(IDirectMusicPort) DirectMusicPort_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicPortImpl_QueryInterface,
IDirectMusicPortImpl_AddRef,
......@@ -233,6 +176,7 @@ ICOM_VTABLE(IDirectMusicPort) DirectMusicPort_Vtbl =
IDirectMusicPortImpl_UnloadInstrument,
IDirectMusicPortImpl_GetLatencyClock,
IDirectMusicPortImpl_GetRunningStats,
IDirectMusicPortImpl_Compact,
IDirectMusicPortImpl_GetCaps,
IDirectMusicPortImpl_DeviceIoControl,
IDirectMusicPortImpl_SetNumChannelGroups,
......@@ -243,16 +187,3 @@ ICOM_VTABLE(IDirectMusicPort) DirectMusicPort_Vtbl =
IDirectMusicPortImpl_SetDirectSound,
IDirectMusicPortImpl_GetFormat
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicPort (LPCGUID lpcGUID, LPDIRECTMUSICPORT* ppDMPort, LPUNKNOWN pUnkOuter)
{
if (IsEqualIID (lpcGUID, &IID_IDirectMusicPort))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
/* IDirectMusicPortDownloadImpl Implementation
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicPortDownload IUnknown parts follow: */
HRESULT WINAPI IDirectMusicPortDownloadImpl_QueryInterface (LPDIRECTMUSICPORTDOWNLOAD iface, REFIID riid, LPVOID *ppobj)
{
HRESULT WINAPI IDirectMusicPortDownloadImpl_QueryInterface (LPDIRECTMUSICPORTDOWNLOAD iface, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPortDownload)) {
......@@ -39,20 +30,17 @@ HRESULT WINAPI IDirectMusicPortDownloadImpl_QueryInterface (LPDIRECTMUSICPORTDOW
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicPortDownloadImpl_AddRef (LPDIRECTMUSICPORTDOWNLOAD iface)
{
ULONG WINAPI IDirectMusicPortDownloadImpl_AddRef (LPDIRECTMUSICPORTDOWNLOAD iface) {
ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicPortDownloadImpl_Release (LPDIRECTMUSICPORTDOWNLOAD iface)
{
ULONG WINAPI IDirectMusicPortDownloadImpl_Release (LPDIRECTMUSICPORTDOWNLOAD iface) {
ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
......@@ -63,62 +51,43 @@ ULONG WINAPI IDirectMusicPortDownloadImpl_Release (LPDIRECTMUSICPORTDOWNLOAD ifa
}
/* IDirectMusicPortDownload Interface follow: */
HRESULT WINAPI IDirectMusicPortDownloadImpl_GetBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD dwDLId, IDirectMusicDownload** ppIDMDownload)
{
HRESULT WINAPI IDirectMusicPortDownloadImpl_GetBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD dwDLId, IDirectMusicDownload** ppIDMDownload) {
ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
FIXME("(%p, %ld, %p): stub\n", This, dwDLId, ppIDMDownload);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortDownloadImpl_AllocateBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD dwSize, IDirectMusicDownload** ppIDMDownload)
{
HRESULT WINAPI IDirectMusicPortDownloadImpl_AllocateBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD dwSize, IDirectMusicDownload** ppIDMDownload) {
ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
FIXME("(%p, %ld, %p): stub\n", This, dwSize, ppIDMDownload);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortDownloadImpl_GetDLId (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* pdwStartDLId, DWORD dwCount)
{
HRESULT WINAPI IDirectMusicPortDownloadImpl_GetDLId (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* pdwStartDLId, DWORD dwCount) {
ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
FIXME("(%p, %p, %ld): stub\n", This, pdwStartDLId, dwCount);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortDownloadImpl_GetAppend (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* pdwAppend)
{
HRESULT WINAPI IDirectMusicPortDownloadImpl_GetAppend (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* pdwAppend) {
ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
FIXME("(%p, %p): stub\n", This, pdwAppend);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortDownloadImpl_Download (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* pIDMDownload)
{
HRESULT WINAPI IDirectMusicPortDownloadImpl_Download (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* pIDMDownload) {
ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
FIXME("(%p, %p): stub\n", This, pIDMDownload);
return S_OK;
}
HRESULT WINAPI IDirectMusicPortDownloadImpl_Unload (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* pIDMDownload)
{
HRESULT WINAPI IDirectMusicPortDownloadImpl_Unload (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* pIDMDownload) {
ICOM_THIS(IDirectMusicPortDownloadImpl,iface);
FIXME("(%p, %p): stub\n", This, pIDMDownload);
return S_OK;
}
ICOM_VTABLE(IDirectMusicPortDownload) DirectMusicPortDownload_Vtbl =
{
ICOM_VTABLE(IDirectMusicPortDownload) DirectMusicPortDownload_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicPortDownloadImpl_QueryInterface,
IDirectMusicPortDownloadImpl_AddRef,
......@@ -130,16 +99,3 @@ ICOM_VTABLE(IDirectMusicPortDownload) DirectMusicPortDownload_Vtbl =
IDirectMusicPortDownloadImpl_Download,
IDirectMusicPortDownloadImpl_Unload
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicPortDownload (LPCGUID lpcGUID, LPDIRECTMUSICPORTDOWNLOAD* ppDMPortDL, LPUNKNOWN pUnkOuter)
{
if (IsEqualIID (lpcGUID, &IID_IDirectMusicPortDownload))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
......@@ -18,21 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "dmusics.h"
#include "dmusici.h"
#include "dmplugin.h"
#include "wine/debug.h"
#include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
......@@ -44,8 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/***********************************************************************
* interface for self-registering
*/
struct regsvr_interface
{
struct regsvr_interface {
IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */
......@@ -57,8 +42,7 @@ struct regsvr_interface
static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass
{
struct regsvr_coclass {
CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */
......@@ -124,8 +108,7 @@ static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/***********************************************************************
* register_interfaces
*/
static HRESULT register_interfaces(struct regsvr_interface const *list)
{
static HRESULT register_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -194,8 +177,7 @@ error_return:
/***********************************************************************
* unregister_interfaces
*/
static HRESULT unregister_interfaces(struct regsvr_interface const *list)
{
static HRESULT unregister_interfaces(struct regsvr_interface const *list) {
LONG res = ERROR_SUCCESS;
HKEY interface_key;
......@@ -219,8 +201,7 @@ error_return:
/***********************************************************************
* register_coclasses
*/
static HRESULT register_coclasses(struct regsvr_coclass const *list)
{
static HRESULT register_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -301,8 +282,7 @@ error_return:
/***********************************************************************
* unregister_coclasses
*/
static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
{
static HRESULT unregister_coclasses(struct regsvr_coclass const *list) {
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
......@@ -338,8 +318,7 @@ error_return:
/***********************************************************************
* regsvr_key_guid
*/
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
{
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) {
WCHAR buf[39];
StringFromGUID2(guid, buf, 39);
......@@ -352,8 +331,7 @@ static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
static LONG register_key_defvalueW(
HKEY base,
WCHAR const *name,
WCHAR const *value)
{
WCHAR const *value) {
LONG res;
HKEY key;
......@@ -372,8 +350,7 @@ static LONG register_key_defvalueW(
static LONG register_key_defvalueA(
HKEY base,
WCHAR const *name,
char const *value)
{
char const *value) {
LONG res;
HKEY key;
......@@ -394,8 +371,7 @@ static LONG register_progid(
char const *progid,
char const *curver_progid,
char const *name,
char const *extra)
{
char const *extra) {
LONG res;
HKEY progid_key;
......@@ -439,8 +415,7 @@ error_close_progid_key:
/***********************************************************************
* recursive_delete_key
*/
static LONG recursive_delete_key(HKEY key)
{
static LONG recursive_delete_key(HKEY key) {
LONG res;
WCHAR subkey_name[MAX_PATH];
DWORD cName;
......@@ -471,8 +446,7 @@ static LONG recursive_delete_key(HKEY key)
/***********************************************************************
* recursive_delete_keyA
*/
static LONG recursive_delete_keyA(HKEY base, char const *name)
{
static LONG recursive_delete_keyA(HKEY base, char const *name) {
LONG res;
HKEY key;
......@@ -487,8 +461,7 @@ static LONG recursive_delete_keyA(HKEY base, char const *name)
/***********************************************************************
* recursive_delete_keyW
*/
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name)
{
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) {
LONG res;
HKEY key;
......@@ -534,8 +507,7 @@ static struct regsvr_interface const interface_list[] = {
/***********************************************************************
* DllRegisterServer (DMUSIC.3)
*/
HRESULT WINAPI DMUSIC_DllRegisterServer(void)
{
HRESULT WINAPI DMUSIC_DllRegisterServer(void) {
HRESULT hr;
TRACE("\n");
......@@ -549,8 +521,7 @@ HRESULT WINAPI DMUSIC_DllRegisterServer(void)
/***********************************************************************
* DllUnregisterServer (DMUSIC.4)
*/
HRESULT WINAPI DMUSIC_DllUnregisterServer(void)
{
HRESULT WINAPI DMUSIC_DllUnregisterServer(void) {
HRESULT hr;
TRACE("\n");
......
/* IDirectMusicThru Implementation
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -17,21 +17,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "dmusic_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
/* IDirectMusicThru IUnknown parts follow: */
HRESULT WINAPI IDirectMusicThruImpl_QueryInterface (LPDIRECTMUSICTHRU iface, REFIID riid, LPVOID *ppobj)
{
HRESULT WINAPI IDirectMusicThruImpl_QueryInterface (LPDIRECTMUSICTHRU iface, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IDirectMusicThruImpl,iface);
if (IsEqualIID (riid, &IID_IUnknown) ||
......@@ -40,20 +31,17 @@ HRESULT WINAPI IDirectMusicThruImpl_QueryInterface (LPDIRECTMUSICTHRU iface, REF
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI IDirectMusicThruImpl_AddRef (LPDIRECTMUSICTHRU iface)
{
ULONG WINAPI IDirectMusicThruImpl_AddRef (LPDIRECTMUSICTHRU iface) {
ICOM_THIS(IDirectMusicThruImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI IDirectMusicThruImpl_Release (LPDIRECTMUSICTHRU iface)
{
ULONG WINAPI IDirectMusicThruImpl_Release (LPDIRECTMUSICTHRU iface) {
ICOM_THIS(IDirectMusicThruImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
......@@ -64,33 +52,16 @@ ULONG WINAPI IDirectMusicThruImpl_Release (LPDIRECTMUSICTHRU iface)
}
/* IDirectMusicThru Interface follow: */
HRESULT WINAPI IDirectMusicThruImpl_ThruChannel (LPDIRECTMUSICTHRU iface, DWORD dwSourceChannelGroup, DWORD dwSourceChannel, DWORD dwDestinationChannelGroup, DWORD dwDestinationChannel, LPDIRECTMUSICPORT pDestinationPort)
{
HRESULT WINAPI IDirectMusicThruImpl_ThruChannel (LPDIRECTMUSICTHRU iface, DWORD dwSourceChannelGroup, DWORD dwSourceChannel, DWORD dwDestinationChannelGroup, DWORD dwDestinationChannel, LPDIRECTMUSICPORT pDestinationPort) {
ICOM_THIS(IDirectMusicThruImpl,iface);
FIXME("(%p, %ld, %ld, %ld, %ld, %p): stub\n", This, dwSourceChannelGroup, dwSourceChannel, dwDestinationChannelGroup, dwDestinationChannel, pDestinationPort);
return S_OK;
}
ICOM_VTABLE(IDirectMusicThru) DirectMusicThru_Vtbl =
{
ICOM_VTABLE(IDirectMusicThru) DirectMusicThru_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectMusicThruImpl_QueryInterface,
IDirectMusicThruImpl_AddRef,
IDirectMusicThruImpl_Release,
IDirectMusicThruImpl_ThruChannel
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicThru (LPCGUID lpcGUID, LPDIRECTMUSICTHRU* ppDMThru, LPUNKNOWN pUnkOuter)
{
if (IsEqualIID (lpcGUID, &IID_IDirectMusicThru))
{
FIXME("Not yet\n");
return E_NOINTERFACE;
}
WARN("No interface found\n");
return E_NOINTERFACE;
}
/*
* Copyright 2001 Ove Kaaven
* Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -19,10 +19,10 @@
#define WINE_OLESELFREGISTER
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic"
#define WINE_FILENAME_STR "dmusic.dll"
#define WINE_FILEVERSION 4,8,1,881
#define WINE_FILEVERSION_STR "4.8.1.881"
#define WINE_PRODUCTVERSION 4,8,1,881
#define WINE_PRODUCTVERSION_STR "4.8"
#define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc"
/* DirectMusic32 Main
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -20,11 +20,21 @@
#include <stdarg.h>
#include "windef.h"
#include "wine/debug.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 "dmusici.h"
#include "dmusicf.h"
#include "dmusics.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
WINE_DEFAULT_DEBUG_CHANNEL(dmusic32);
HRESULT WINAPI DMUSIC32_CreateCDirectMusicEmulatePort (LPVOID ptr1, LPVOID ptr2, LPVOID ptr3)
{
......
/*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -18,10 +18,10 @@
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Legacy Port"
#define WINE_FILENAME_STR "dmusic32.dll"
#define WINE_FILEVERSION 4,8,1,881
#define WINE_FILEVERSION_STR "4.8.1.881"
#define WINE_PRODUCTVERSION 4,8,1,881
#define WINE_PRODUCTVERSION_STR "4.8"
#define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc"
Makefile
dswave.dll.dbg.c
dswave.spec.c
dswave.spec.def
version.res
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = dswave.dll
IMPORTS = msacm32 ole32 user32 advapi32 kernel32
EXTRALIBS = $(LIBUUID)
C_SRCS = \
dswave.c \
dswave_main.c \
regsvr.c
RC_SRCS = version.rc
@MAKE_DLL_RULES@
### Dependencies:
@ stdcall -private DllCanUnloadNow() DSWAVE_DllCanUnloadNow
@ stdcall -private DllGetClassObject(ptr ptr ptr) DSWAVE_DllGetClassObject
@ stdcall -private DllRegisterServer() DSWAVE_DllRegisterServer
@ stdcall -private DllUnregisterServer() DSWAVE_DllUnregisterServer
/* DirectMusic Wave Main
*
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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.
*/
#include "dswave_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dswave);
typedef struct {
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
} IClassFactoryImpl;
/******************************************************************
* DirectMusicWave ClassFactory
*/
static HRESULT WINAPI WaveCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI WaveCF_AddRef(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI WaveCF_Release(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
/* static class, won't be freed */
return --(This->ref);
}
static HRESULT WINAPI WaveCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
return DMUSIC_CreateDirectMusicWaveImpl (riid, ppobj, pOuter);
}
static HRESULT WINAPI WaveCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n", This, dolock);
return S_OK;
}
static ICOM_VTABLE(IClassFactory) WaveCF_Vtbl = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
WaveCF_QueryInterface,
WaveCF_AddRef,
WaveCF_Release,
WaveCF_CreateInstance,
WaveCF_LockServer
};
static IClassFactoryImpl Wave_CF = {&WaveCF_Vtbl, 1 };
/******************************************************************
* DllMain
*
*
*/
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
if (fdwReason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */
} else if (fdwReason == DLL_PROCESS_DETACH) {
/* FIXME: Cleanup */
}
return TRUE;
}
/******************************************************************
* DllCanUnloadNow (DSWAVE.1)
*
*
*/
HRESULT WINAPI DSWAVE_DllCanUnloadNow(void) {
FIXME("(void): stub\n");
return S_FALSE;
}
/******************************************************************
* DllGetClassObject (DSWAVE.2)
*
*
*/
HRESULT WINAPI DSWAVE_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) {
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (IsEqualCLSID (rclsid, &CLSID_DirectSoundWave) && IsEqualIID (riid, &IID_IClassFactory)) {
*ppv = (LPVOID) &Wave_CF;
IClassFactory_AddRef((IClassFactory*)*ppv);
return S_OK;
}
WARN("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
/* DirectMusic Wave Private Include
*
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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_DSWAVE_PRIVATE_H
#define __WINE_DSWAVE_PRIVATE_H
#include <stdarg.h>
#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 "dmusici.h"
#include "dmusicf.h"
#include "dmusics.h"
/*****************************************************************************
* Interfaces
*/
typedef struct IDirectMusicWaveImpl IDirectMusicWaveImpl;
/*****************************************************************************
* Predeclare the interface implementation structures
*/
extern ICOM_VTABLE(IUnknown) DirectMusicWave_Unknown_Vtbl;
extern ICOM_VTABLE(IDirectMusicObject) DirectMusicWave_Object_Vtbl;
extern ICOM_VTABLE(IPersistStream) DirectMusicWave_PersistStream_Vtbl;
/*****************************************************************************
* ClassFactory
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicWaveImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
/*****************************************************************************
* IDirectMusicWaveImpl implementation structure
*/
struct IDirectMusicWaveImpl {
/* IUnknown fields */
ICOM_VTABLE(IUnknown) *UnknownVtbl;
ICOM_VTABLE(IDirectMusicObject) *ObjectVtbl;
ICOM_VTABLE(IPersistStream) *PersistStreamVtbl;
DWORD ref;
/* IDirectMusicWaveImpl fields */
LPDMUS_OBJECTDESC pDesc;
};
/* IUnknown: */
extern HRESULT WINAPI IDirectMusicWaveImpl_IUnknown_QueryInterface (LPUNKNOWN iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDirectMusicWaveImpl_IUnknown_AddRef (LPUNKNOWN iface);
extern ULONG WINAPI IDirectMusicWaveImpl_IUnknown_Release (LPUNKNOWN iface);
/* IDirectMusicObject: */
extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_QueryInterface (LPDIRECTMUSICOBJECT iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDirectMusicWaveImpl_IDirectMusicObject_AddRef (LPDIRECTMUSICOBJECT iface);
extern ULONG WINAPI IDirectMusicWaveImpl_IDirectMusicObject_Release (LPDIRECTMUSICOBJECT iface);
extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_GetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc);
extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_SetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc);
extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_ParseDescriptor (LPDIRECTMUSICOBJECT iface, LPSTREAM pStream, LPDMUS_OBJECTDESC pDesc);
/* IPersistStream: */
extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_QueryInterface (LPPERSISTSTREAM iface, REFIID riid, void** ppvObject);
extern ULONG WINAPI IDirectMusicWaveImpl_IPersistStream_AddRef (LPPERSISTSTREAM iface);
extern ULONG WINAPI IDirectMusicWaveImpl_IPersistStream_Release (LPPERSISTSTREAM iface);
extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_GetClassID (LPPERSISTSTREAM iface, CLSID* pClassID);
extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_IsDirty (LPPERSISTSTREAM iface);
extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_Load (LPPERSISTSTREAM iface, IStream* pStm);
extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty);
extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize);
/*****************************************************************************
* Misc.
*/
/* for simpler reading */
typedef struct _DMUS_PRIVATE_CHUNK {
FOURCC fccID; /* FOURCC ID of the chunk */
DWORD dwSize; /* size of the chunk */
} DMUS_PRIVATE_CHUNK, *LPDMUS_PRIVATE_CHUNK;
/* check whether the given DWORD is even (return 0) or odd (return 1) */
static inline int even_or_odd (DWORD number) {
return (number & 0x1); /* basically, check if bit 0 is set ;) */
}
/* FOURCC to string conversion for debug messages */
static inline const char *debugstr_fourcc (DWORD fourcc) {
if (!fourcc) return "'null'";
return wine_dbg_sprintf ("\'%c%c%c%c\'",
(char)(fourcc), (char)(fourcc >> 8),
(char)(fourcc >> 16), (char)(fourcc >> 24));
}
/* DMUS_VERSION struct to string conversion for debug messages */
static inline const char *debugstr_dmversion (LPDMUS_VERSION version) {
if (!version) return "'null'";
return wine_dbg_sprintf ("\'%i,%i,%i,%i\'",
(int)((version->dwVersionMS && 0xFFFF0000) >> 8), (int)(version->dwVersionMS && 0x0000FFFF),
(int)((version->dwVersionLS && 0xFFFF0000) >> 8), (int)(version->dwVersionLS && 0x0000FFFF));
}
/* used for initialising structs (primarily for DMUS_OBJECTDESC) */
#define DM_STRUCT_INIT(x) \
do { \
memset((x), 0, sizeof(*(x))); \
(x)->dwSize = sizeof(*x); \
} while (0)
/* used for generic dumping (copied from ddraw) */
typedef struct {
DWORD val;
const char* name;
} flag_info;
#define FE(x) { x, #x }
#define DMUSIC_dump_flags(flags,names,num_names) DMUSIC_dump_flags_(flags, names, num_names, 1)
/* generic dump function */
static inline void DMUSIC_dump_flags_ (DWORD flags, const flag_info* names, size_t num_names, int newline) {
unsigned int i;
for (i=0; i < num_names; i++) {
if ((flags & names[i].val) || /* standard flag value */
((!flags) && (!names[i].val))) /* zero value only */
DPRINTF("%s ", names[i].name);
}
if (newline) DPRINTF("\n");
}
static inline void DMUSIC_dump_DMUS_OBJ_FLAGS (DWORD flagmask) {
static const flag_info flags[] = {
FE(DMUS_OBJ_OBJECT),
FE(DMUS_OBJ_CLASS),
FE(DMUS_OBJ_NAME),
FE(DMUS_OBJ_CATEGORY),
FE(DMUS_OBJ_FILENAME),
FE(DMUS_OBJ_FULLPATH),
FE(DMUS_OBJ_URL),
FE(DMUS_OBJ_VERSION),
FE(DMUS_OBJ_DATE),
FE(DMUS_OBJ_LOADED),
FE(DMUS_OBJ_MEMORY),
FE(DMUS_OBJ_STREAM)
};
DMUSIC_dump_flags(flagmask, flags, sizeof(flags)/sizeof(flags[0]));
}
static inline void DMUSIC_dump_DMUS_OBJECTDESC (LPDMUS_OBJECTDESC pDesc) {
if (pDesc) {
DPRINTF("DMUS_OBJECTDESC (%p)\n", pDesc);
DPRINTF(" - dwSize = %ld\n", pDesc->dwSize);
DPRINTF(" - dwValidData = ");
DMUSIC_dump_DMUS_OBJ_FLAGS (pDesc->dwValidData);
if (pDesc->dwValidData & DMUS_OBJ_CLASS) DPRINTF(" - guidClass = %s\n", debugstr_guid(&pDesc->guidClass));
if (pDesc->dwValidData & DMUS_OBJ_OBJECT) DPRINTF(" - guidObject = %s\n", debugstr_guid(&pDesc->guidObject));
if (pDesc->dwValidData & DMUS_OBJ_DATE) DPRINTF(" - ftDate = FIXME\n");
if (pDesc->dwValidData & DMUS_OBJ_VERSION) DPRINTF(" - vVersion = %s\n", debugstr_dmversion(&pDesc->vVersion));
if (pDesc->dwValidData & DMUS_OBJ_NAME) DPRINTF(" - wszName = %s\n", debugstr_w(pDesc->wszName));
if (pDesc->dwValidData & DMUS_OBJ_CATEGORY) DPRINTF(" - wszCategory = %s\n", debugstr_w(pDesc->wszCategory));
if (pDesc->dwValidData & DMUS_OBJ_FILENAME) DPRINTF(" - wszFileName = %s\n", debugstr_w(pDesc->wszFileName));
if (pDesc->dwValidData & DMUS_OBJ_MEMORY) DPRINTF(" - llMemLength = %lli\n - pbMemData = %p\n", pDesc->llMemLength, pDesc->pbMemData);
if (pDesc->dwValidData & DMUS_OBJ_STREAM) DPRINTF(" - pStream = %p\n", pDesc->pStream);
} else {
DPRINTF("(NULL)\n");
}
}
#endif /* __WINE_DSWAVE_PRIVATE_H */
/*
* Copyright (C) 2003-2004 Rok Mandeljc <rok.mandeljc@gimb.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define WINE_OLESELFREGISTER
#define WINE_FILEDESCRIPTION_STR "Wine DirectMusic Wave"
#define WINE_FILENAME_STR "dswave.dll"
#define WINE_FILEVERSION 4,9,0,900
#define WINE_FILEVERSION_STR "4.9.0.900"
#define WINE_PRODUCTVERSION 4,9,0,900
#define WINE_PRODUCTVERSION_STR "4.9"
#define WINE_PRODUCTNAME_STR "DirectX"
#include "wine/wine_common_ver.rc"
......@@ -63,6 +63,7 @@ WINDOWS_INCLUDES = \
dispdib.h \
dlgs.h \
dls1.h \
dls2.h \
dmdls.h \
dmerror.h \
dmo.h \
......
/* Defines and Structures for Instrument Collection Form RIFF DLS
/* Defines and Structures for Instrument Collection Form RIFF DLS1
*
* Copyright (C) 2003 Rok Mandeljc
* Copyright (C) 2003-2004 Rok Mandeljc
*
* 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
......@@ -21,7 +21,7 @@
#define __WINE_INCLUDE_DLS1_H
/*****************************************************************************
* FOURCC's
* FOURCCs
*/
#define FOURCC_DLS mmioFOURCC('D','L','S',' ')
#define FOURCC_DLID mmioFOURCC('d','l','i','d')
......@@ -43,149 +43,160 @@
#define FOURCC_VERS mmioFOURCC('v','e','r','s')
/*****************************************************************************
* Definitions
* Flags
*/
#define CONN_SRC_NONE 0x0000
#define CONN_SRC_LFO 0x0001
#define CONN_SRC_KEYONVELOCITY 0x0002
#define CONN_SRC_KEYNUMBER 0x0003
#define CONN_SRC_EG1 0x0004
#define CONN_SRC_EG2 0x0005
#define CONN_SRC_PITCHWHEEL 0x0006
#define CONN_SRC_CC1 0x0081
#define CONN_SRC_CC7 0x0087
#define CONN_SRC_CC10 0x008a
#define CONN_SRC_CC11 0x008b
#define CONN_DST_NONE 0x0000
#define CONN_DST_ATTENUATION 0x0001
#define CONN_DST_PITCH 0x0003
#define CONN_DST_PAN 0x0004
#define CONN_DST_LFO_FREQUENCY 0x0104
#define CONN_DST_LFO_STARTDELAY 0x0105
#define CONN_DST_EG1_ATTACKTIME 0x0206
#define CONN_DST_EG1_DECAYTIME 0x0207
#define CONN_DST_EG1_RELEASETIME 0x0209
#define CONN_DST_EG1_SUSTAINLEVEL 0x020a
#define CONN_DST_EG2_ATTACKTIME 0x030a
#define CONN_DST_EG2_DECAYTIME 0x030b
#define CONN_DST_EG2_RELEASETIME 0x030d
#define CONN_DST_EG2_SUSTAINLEVEL 0x030e
#define CONN_TRN_NONE 0x0000
#define CONN_TRN_CONCAVE 0x0001
#define CONN_DST_NONE 0x000
#define CONN_DST_ATTENUATION 0x001
#define CONN_DST_PITCH 0x003
#define CONN_DST_PAN 0x004
#define CONN_DST_LFO_FREQUENCY 0x104
#define CONN_DST_LFO_STARTDELAY 0x105
#define CONN_DST_EG1_ATTACKTIME 0x206
#define CONN_DST_EG1_DECAYTIME 0x207
#define CONN_DST_EG1_RELEASETIME 0x209
#define CONN_DST_EG1_SUSTAINLEVEL 0x20A
#define CONN_DST_EG2_ATTACKTIME 0x30A
#define CONN_DST_EG2_DECAYTIME 0x30B
#define CONN_DST_EG2_RELEASETIME 0x30D
#define CONN_DST_EG2_SUSTAINLEVEL 0x30E
#define CONN_SRC_NONE 0x000
#define CONN_SRC_LFO 0x001
#define CONN_SRC_KEYONVELOCITY 0x002
#define CONN_SRC_KEYNUMBER 0x003
#define CONN_SRC_EG1 0x004
#define CONN_SRC_EG2 0x005
#define CONN_SRC_PITCHWHEEL 0x006
#define CONN_SRC_CC1 0x081
#define CONN_SRC_CC7 0x087
#define CONN_SRC_CC10 0x08A
#define CONN_SRC_CC11 0x08B
#define CONN_TRN_NONE 0x000
#define CONN_TRN_CONCAVE 0x001
#define F_INSTRUMENT_DRUMS 0x80000000
#define F_RGN_OPTION_SELFNONEXCLUSIVE 0x0001
#define WAVELINK_CHANNEL_LEFT 0x0001l
#define WAVELINK_CHANNEL_RIGHT 0x0002l
#define F_RGN_OPTION_SELFNONEXCLUSIVE 0x1
#define F_WAVELINK_PHASE_MASTER 0x1
#define F_WSMP_NO_TRUNCATION 0x1
#define F_WSMP_NO_COMPRESSION 0x2
#define F_WAVELINK_PHASE_MASTER 0x0001
#define POOL_CUE_NULL 0xffffffffl
#define POOL_CUE_NULL 0xFFFFFFFF
#define F_WSMP_NO_TRUNCATION 0x0001l
#define F_WSMP_NO_COMPRESSION 0x0002l
#define WAVELINK_CHANNEL_LEFT 0x1
#define WAVELINK_CHANNEL_RIGHT 0x2
#define WLOOP_TYPE_FORWARD 0
#define WLOOP_TYPE_FORWARD 0x0
/*****************************************************************************
* Structures
*/
typedef struct _DLSID
{
/* typedef definitions */
typedef struct _DLSID DLSID, *LPDLSID;
typedef struct _DLSVERSION DLSVERSION, *LPDLSVERSION;
typedef struct _CONNECTION CONNECTION, *LPCONNECTION;
typedef struct _CONNECTIONLIST CONNECTIONLIST, *LPCONNECTIONLIST;
typedef struct _RGNRANGE RGNRANGE, *LPRGNRANGE;
typedef struct _MIDILOCALE MIDILOCALE, *LPMIDILOCALE;
typedef struct _RGNHEADER RGNHEADER, *LPRGNHEADER;
typedef struct _INSTHEADER INSTHEADER, *LPINSTHEADER;
typedef struct _DLSHEADER DLSHEADER, *LPDLSHEADER;
typedef struct _WAVELINK WAVELINK, *LPWAVELINK;
typedef struct _POOLCUE POOLCUE, *LPPOOLCUE;
typedef struct _POOLTABLE POOLTABLE, *LPPOOLTABLE;
typedef struct _rwsmp WSMPL, *LPWSMPL;
typedef struct _rloop WLOOP, *LPWLOOP;
/* actual structures */
struct _DLSID {
ULONG ulData1;
USHORT usData2;
USHORT usData3;
BYTE abData4[8];
} DLSID, *LPDLSID;
};
typedef struct _DLSVERSION
{ DWORD dwVersionMS;
struct _DLSVERSION {
DWORD dwVersionMS;
DWORD dwVersionLS;
} DLSVERSION, *LPDLSVERSION;
};
typedef struct _CONNECTION
{
struct _CONNECTION {
USHORT usSource;
USHORT usControl;
USHORT usDestination;
USHORT usTransform;
LONG lScale;
} CONNECTION, *LPCONNECTION;
};
typedef struct _CONNECTIONLIST
{
struct _CONNECTIONLIST {
ULONG cbSize;
ULONG cConnections;
} CONNECTIONLIST, *LPCONNECTIONLIST;
};
typedef struct _RGNRANGE
{
struct _RGNRANGE {
USHORT usLow;
USHORT usHigh;
} RGNRANGE, *LPRGNRANGE;
};
typedef struct _MIDILOCALE
{
struct _MIDILOCALE {
ULONG ulBank;
ULONG ulInstrument;
} MIDILOCALE, *LPMIDILOCALE;
};
typedef struct _RGNHEADER
{
struct _RGNHEADER {
RGNRANGE RangeKey;
RGNRANGE RangeVelocity;
USHORT fusOptions;
USHORT usKeyGroup;
} RGNHEADER, *LPRGNHEADER;
};
typedef struct _INSTHEADER
{
struct _INSTHEADER {
ULONG cRegions;
MIDILOCALE Locale;
} INSTHEADER, *LPINSTHEADER;
};
typedef struct _DLSHEADER
{
struct _DLSHEADER {
ULONG cInstruments;
} DLSHEADER, *LPDLSHEADER;
};
typedef struct _WAVELINK
{
struct _WAVELINK {
USHORT fusOptions;
USHORT usPhaseGroup;
ULONG ulChannel;
ULONG ulTableIndex;
} WAVELINK, *LPWAVELINK;
};
typedef struct _POOLCUE
{
struct _POOLCUE {
ULONG ulOffset;
} POOLCUE, *LPPOOLCUE;
};
typedef struct _POOLTABLE
{
struct _POOLTABLE {
ULONG cbSize;
ULONG cCues;
} POOLTABLE, *LPPOOLTABLE;
};
typedef struct _rwsmp
{
struct _rwsmp {
ULONG cbSize;
USHORT usUnityNote;
SHORT sFineTune;
LONG lAttenuation;
ULONG fulOptions;
ULONG cSampleLoops;
} WSMPL, *LPWSMPL;
};
typedef struct _rloop
{
struct _rloop {
ULONG cbSize;
ULONG ulType;
ULONG ulStart;
ULONG ulLength;
} WLOOP, *LPWLOOP;
};
#endif /* __WINE_INCLUDE_DLS1_H */
This diff is collapsed. Click to expand it.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment