ReactOS 0.4.16-dev-122-g325d74c
port.c File Reference
#include <assert.h>
#include "dmusic_private.h"
#include "wine/heap.h"
Include dependency graph for port.c:

Go to the source code of this file.

Classes

struct  SynthPortImpl
 
struct  midi_port
 

Typedefs

typedef struct SynthPortImpl SynthPortImpl
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (dmusic)
 
static IDirectMusicDownloadedInstrumentImplimpl_from_IDirectMusicDownloadedInstrument (IDirectMusicDownloadedInstrument *iface)
 
static SynthPortImplimpl_from_SynthPortImpl_IDirectMusicPort (IDirectMusicPort *iface)
 
static SynthPortImplimpl_from_SynthPortImpl_IDirectMusicPortDownload (IDirectMusicPortDownload *iface)
 
static SynthPortImplimpl_from_SynthPortImpl_IDirectMusicThru (IDirectMusicThru *iface)
 
static SynthPortImplimpl_from_IKsControl (IKsControl *iface)
 
static HRESULT WINAPI IDirectMusicDownloadedInstrumentImpl_QueryInterface (IDirectMusicDownloadedInstrument *iface, REFIID riid, VOID **ret_iface)
 
static ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_AddRef (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface)
 
static ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_Release (LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface)
 
static IDirectMusicDownloadedInstrumentImplunsafe_impl_from_IDirectMusicDownloadedInstrument (IDirectMusicDownloadedInstrument *iface)
 
static HRESULT DMUSIC_CreateDirectMusicDownloadedInstrumentImpl (IDirectMusicDownloadedInstrument **instrument)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_QueryInterface (LPDIRECTMUSICPORT iface, REFIID riid, LPVOID *ret_iface)
 
static ULONG WINAPI SynthPortImpl_IDirectMusicPort_AddRef (LPDIRECTMUSICPORT iface)
 
static ULONG WINAPI SynthPortImpl_IDirectMusicPort_Release (LPDIRECTMUSICPORT iface)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_PlayBuffer (LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER buffer)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetReadNotificationHandle (LPDIRECTMUSICPORT iface, HANDLE event)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_Read (LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER buffer)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_DownloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicInstrument *instrument, IDirectMusicDownloadedInstrument **downloaded_instrument, DMUS_NOTERANGE *note_ranges, DWORD num_note_ranges)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_UnloadInstrument (LPDIRECTMUSICPORT iface, IDirectMusicDownloadedInstrument *downloaded_instrument)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetLatencyClock (LPDIRECTMUSICPORT iface, IReferenceClock **clock)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetRunningStats (LPDIRECTMUSICPORT iface, LPDMUS_SYNTHSTATS stats)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_Compact (LPDIRECTMUSICPORT iface)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetCaps (LPDIRECTMUSICPORT iface, LPDMUS_PORTCAPS port_caps)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_DeviceIoControl (LPDIRECTMUSICPORT iface, DWORD io_control_code, LPVOID in_buffer, DWORD in_buffer_size, LPVOID out_buffer, DWORD out_buffer_size, LPDWORD bytes_returned, LPOVERLAPPED overlapped)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetNumChannelGroups (LPDIRECTMUSICPORT iface, DWORD channel_groups)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetNumChannelGroups (LPDIRECTMUSICPORT iface, LPDWORD channel_groups)
 
static HRESULT WINAPI synth_dmport_Activate (IDirectMusicPort *iface, BOOL active)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetChannelPriority (LPDIRECTMUSICPORT iface, DWORD channel_group, DWORD channel, DWORD priority)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetChannelPriority (LPDIRECTMUSICPORT iface, DWORD channel_group, DWORD channel, LPDWORD priority)
 
static HRESULT WINAPI synth_dmport_SetDirectSound (IDirectMusicPort *iface, IDirectSound *dsound, IDirectSoundBuffer *dsbuffer)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetFormat (LPDIRECTMUSICPORT iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_QueryInterface (LPDIRECTMUSICPORTDOWNLOAD iface, REFIID riid, LPVOID *ret_iface)
 
static ULONG WINAPI SynthPortImpl_IDirectMusicPortDownload_AddRef (LPDIRECTMUSICPORTDOWNLOAD iface)
 
static ULONG WINAPI SynthPortImpl_IDirectMusicPortDownload_Release (LPDIRECTMUSICPORTDOWNLOAD iface)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD DLId, IDirectMusicDownload **IDMDownload)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_AllocateBuffer (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD size, IDirectMusicDownload **IDMDownload)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetDLId (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD *start_DLId, DWORD count)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetAppend (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD *append)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_Download (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload *IDMDownload)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_Unload (LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload *IDMDownload)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicThru_QueryInterface (LPDIRECTMUSICTHRU iface, REFIID riid, LPVOID *ret_iface)
 
static ULONG WINAPI SynthPortImpl_IDirectMusicThru_AddRef (LPDIRECTMUSICTHRU iface)
 
static ULONG WINAPI SynthPortImpl_IDirectMusicThru_Release (LPDIRECTMUSICTHRU iface)
 
static HRESULT WINAPI SynthPortImpl_IDirectMusicThru_ThruChannel (LPDIRECTMUSICTHRU iface, DWORD source_channel_group, DWORD source_channel, DWORD destination_channel_group, DWORD destination_channel, LPDIRECTMUSICPORT destination_port)
 
static HRESULT WINAPI IKsControlImpl_QueryInterface (IKsControl *iface, REFIID riid, void **ret_iface)
 
static ULONG WINAPI IKsControlImpl_AddRef (IKsControl *iface)
 
static ULONG WINAPI IKsControlImpl_Release (IKsControl *iface)
 
static HRESULT WINAPI IKsControlImpl_KsProperty (IKsControl *iface, KSPROPERTY *prop, ULONG prop_len, void *data, ULONG data_len, ULONG *ret_len)
 
static HRESULT WINAPI IKsControlImpl_KsMethod (IKsControl *iface, KSMETHOD *method, ULONG method_len, void *data, ULONG data_len, ULONG *ret_len)
 
static HRESULT WINAPI IKsControlImpl_KsEvent (IKsControl *iface, KSEVENT *event, ULONG event_len, void *data, ULONG data_len, ULONG *ret_len)
 
HRESULT synth_port_create (IDirectMusic8Impl *parent, DMUS_PORTPARAMS *port_params, DMUS_PORTCAPS *port_caps, IDirectMusicPort **port)
 
static struct midi_portimpl_from_IDirectMusicPort (IDirectMusicPort *iface)
 
static HRESULT WINAPI midi_IDirectMusicPort_QueryInterface (IDirectMusicPort *iface, REFIID riid, void **ret_iface)
 
static ULONG WINAPI midi_IDirectMusicPort_AddRef (IDirectMusicPort *iface)
 
static ULONG WINAPI midi_IDirectMusicPort_Release (IDirectMusicPort *iface)
 
static HRESULT WINAPI midi_IDirectMusicPort_PlayBuffer (IDirectMusicPort *iface, IDirectMusicBuffer *buffer)
 
static HRESULT WINAPI midi_IDirectMusicPort_SetReadNotificationHandle (IDirectMusicPort *iface, HANDLE event)
 
static HRESULT WINAPI midi_IDirectMusicPort_Read (IDirectMusicPort *iface, IDirectMusicBuffer *buffer)
 
static HRESULT WINAPI midi_IDirectMusicPort_DownloadInstrument (IDirectMusicPort *iface, IDirectMusicInstrument *instrument, IDirectMusicDownloadedInstrument **downloaded, DMUS_NOTERANGE *ranges, DWORD num_ranges)
 
static HRESULT WINAPI midi_IDirectMusicPort_UnloadInstrument (IDirectMusicPort *iface, IDirectMusicDownloadedInstrument *downloaded)
 
static HRESULT WINAPI midi_IDirectMusicPort_GetLatencyClock (IDirectMusicPort *iface, IReferenceClock **clock)
 
static HRESULT WINAPI midi_IDirectMusicPort_GetRunningStats (IDirectMusicPort *iface, DMUS_SYNTHSTATS *stats)
 
static HRESULT WINAPI midi_IDirectMusicPort_Compact (IDirectMusicPort *iface)
 
static HRESULT WINAPI midi_IDirectMusicPort_GetCaps (IDirectMusicPort *iface, DMUS_PORTCAPS *caps)
 
static HRESULT WINAPI midi_IDirectMusicPort_DeviceIoControl (IDirectMusicPort *iface, DWORD io_control_code, void *in, DWORD size_in, void *out, DWORD size_out, DWORD *ret_len, OVERLAPPED *overlapped)
 
static HRESULT WINAPI midi_IDirectMusicPort_SetNumChannelGroups (IDirectMusicPort *iface, DWORD cgroups)
 
static HRESULT WINAPI midi_IDirectMusicPort_GetNumChannelGroups (IDirectMusicPort *iface, DWORD *cgroups)
 
static HRESULT WINAPI midi_IDirectMusicPort_Activate (IDirectMusicPort *iface, BOOL active)
 
static HRESULT WINAPI midi_IDirectMusicPort_SetChannelPriority (IDirectMusicPort *iface, DWORD channel_group, DWORD channel, DWORD priority)
 
static HRESULT WINAPI midi_IDirectMusicPort_GetChannelPriority (IDirectMusicPort *iface, DWORD channel_group, DWORD channel, DWORD *priority)
 
static HRESULT WINAPI midi_IDirectMusicPort_SetDirectSound (IDirectMusicPort *iface, IDirectSound *dsound, IDirectSoundBuffer *dsbuffer)
 
static HRESULT WINAPI midi_IDirectMusicPort_GetFormat (IDirectMusicPort *iface, WAVEFORMATEX *format, DWORD *format_size, DWORD *buffer_size)
 
static struct midi_portimpl_from_IDirectMusicThru (IDirectMusicThru *iface)
 
static HRESULT WINAPI midi_IDirectMusicThru_QueryInterface (IDirectMusicThru *iface, REFIID riid, void **ret_iface)
 
static ULONG WINAPI midi_IDirectMusicThru_AddRef (IDirectMusicThru *iface)
 
static ULONG WINAPI midi_IDirectMusicThru_Release (IDirectMusicThru *iface)
 
static HRESULT WINAPI midi_IDirectMusicThru_ThruChannel (IDirectMusicThru *iface, DWORD src_group, DWORD src_channel, DWORD dest_group, DWORD dest_channel, IDirectMusicPort *dest_port)
 
static HRESULT midi_port_create (IDirectMusic8Impl *parent, DMUS_PORTPARAMS *params, DMUS_PORTCAPS *caps, IDirectMusicPort **port)
 
HRESULT midi_out_port_create (IDirectMusic8Impl *parent, DMUS_PORTPARAMS *params, DMUS_PORTCAPS *caps, IDirectMusicPort **port)
 
HRESULT midi_in_port_create (IDirectMusic8Impl *parent, DMUS_PORTPARAMS *params, DMUS_PORTCAPS *caps, IDirectMusicPort **port)
 

Variables

static const IDirectMusicDownloadedInstrumentVtbl DirectMusicDownloadedInstrument_Vtbl
 
static const IDirectMusicPortVtbl SynthPortImpl_DirectMusicPort_Vtbl
 
static const IDirectMusicPortDownloadVtbl SynthPortImpl_DirectMusicPortDownload_Vtbl
 
static const IDirectMusicThruVtbl SynthPortImpl_DirectMusicThru_Vtbl
 
static const IKsControlVtbl ikscontrol_vtbl
 
static const IDirectMusicPortVtbl midi_port_vtbl
 
static const IDirectMusicThruVtbl midi_thru_vtbl
 

Typedef Documentation

◆ SynthPortImpl

Function Documentation

◆ DMUSIC_CreateDirectMusicDownloadedInstrumentImpl()

static HRESULT DMUSIC_CreateDirectMusicDownloadedInstrumentImpl ( IDirectMusicDownloadedInstrument **  instrument)
static

Definition at line 131 of file port.c.

132{
134
135 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
136 if (!object)
137 {
138 *instrument = NULL;
139 return E_OUTOFMEMORY;
140 }
141
142 object->IDirectMusicDownloadedInstrument_iface.lpVtbl = &DirectMusicDownloadedInstrument_Vtbl;
143 object->ref = 1;
144
145 *instrument = &object->IDirectMusicDownloadedInstrument_iface;
147
148 return S_OK;
149}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NULL
Definition: types.h:112
static const IDirectMusicDownloadedInstrumentVtbl DirectMusicDownloadedInstrument_Vtbl
Definition: port.c:116
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
static void DMUSIC_LockModule(void)
#define S_OK
Definition: intsafe.h:52

Referenced by SynthPortImpl_IDirectMusicPort_DownloadInstrument().

◆ IDirectMusicDownloadedInstrumentImpl_AddRef()

static ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_AddRef ( LPDIRECTMUSICDOWNLOADEDINSTRUMENT  iface)
static

Definition at line 89 of file port.c.

90{
93
94 TRACE("(%p)->(): new ref = %u\n", iface, ref);
95
96 return ref;
97}
#define InterlockedIncrement
Definition: armddk.h:53
static IDirectMusicDownloadedInstrumentImpl * impl_from_IDirectMusicDownloadedInstrument(IDirectMusicDownloadedInstrument *iface)
Definition: port.c:47
#define TRACE(s)
Definition: solgame.cpp:4
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

◆ IDirectMusicDownloadedInstrumentImpl_QueryInterface()

static HRESULT WINAPI IDirectMusicDownloadedInstrumentImpl_QueryInterface ( IDirectMusicDownloadedInstrument *  iface,
REFIID  riid,
VOID **  ret_iface 
)
static

Definition at line 73 of file port.c.

74{
75 TRACE("(%p, %s, %p)\n", iface, debugstr_dmguid(riid), ret_iface);
76
77 if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDirectMusicDownloadedInstrument))
78 {
80 *ret_iface = iface;
81 return S_OK;
82 }
83
84 WARN("(%p, %s, %p): not found\n", iface, debugstr_dmguid(riid), ret_iface);
85
86 return E_NOINTERFACE;
87}
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
const char * debugstr_dmguid(const GUID *id)
Definition: dmusic_main.c:237
#define IDirectMusicDownloadedInstrument_AddRef(p)
Definition: dmusicc.h:550
REFIID riid
Definition: atlbase.h:39
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ IDirectMusicDownloadedInstrumentImpl_Release()

static ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_Release ( LPDIRECTMUSICDOWNLOADEDINSTRUMENT  iface)
static

Definition at line 99 of file port.c.

100{
103
104 TRACE("(%p)->(): new ref = %u\n", iface, ref);
105
106 if (!ref)
107 {
108 HeapFree(GetProcessHeap(), 0, This->data);
111 }
112
113 return ref;
114}
#define InterlockedDecrement
Definition: armddk.h:52
#define HeapFree(x, y, z)
Definition: compat.h:735
static void DMUSIC_UnlockModule(void)

◆ IKsControlImpl_AddRef()

static ULONG WINAPI IKsControlImpl_AddRef ( IKsControl iface)
static

Definition at line 753 of file port.c.

754{
756
757 return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface);
758}
static SynthPortImpl * impl_from_IKsControl(IKsControl *iface)
Definition: port.c:67
#define IDirectMusicPort_AddRef(p)
Definition: dmusicc.h:678

◆ IKsControlImpl_KsEvent()

static HRESULT WINAPI IKsControlImpl_KsEvent ( IKsControl iface,
KSEVENT event,
ULONG  event_len,
void data,
ULONG  data_len,
ULONG ret_len 
)
static

Definition at line 797 of file port.c.

799{
800 FIXME("(%p)->(%p, %u, %p, %u, %p): stub\n", iface, event, event_len, data, data_len, ret_len);
801
802 return E_NOTIMPL;
803}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_NOTIMPL
Definition: ddrawi.h:99
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
struct _cl_event * event
Definition: glext.h:7739
static JOBOBJECTINFOCLASS LPVOID DWORD LPDWORD ret_len
Definition: process.c:79

◆ IKsControlImpl_KsMethod()

static HRESULT WINAPI IKsControlImpl_KsMethod ( IKsControl iface,
KSMETHOD method,
ULONG  method_len,
void data,
ULONG  data_len,
ULONG ret_len 
)
static

Definition at line 789 of file port.c.

791{
792 FIXME("(%p)->(%p, %u, %p, %u, %p): stub\n", iface, method, method_len, data, data_len, ret_len);
793
794 return E_NOTIMPL;
795}
method
Definition: dragdrop.c:54

◆ IKsControlImpl_KsProperty()

static HRESULT WINAPI IKsControlImpl_KsProperty ( IKsControl iface,
KSPROPERTY prop,
ULONG  prop_len,
void data,
ULONG  data_len,
ULONG ret_len 
)
static

Definition at line 767 of file port.c.

769{
770 TRACE("(%p)->(%p, %u, %p, %u, %p)\n", iface, prop, prop_len, data, data_len, ret_len);
771 TRACE("prop = %s - %u - %u\n", debugstr_guid(&prop->u.s.Set), prop->u.s.Id, prop->u.s.Flags);
772
773 if (prop->u.s.Flags != KSPROPERTY_TYPE_GET)
774 {
775 FIXME("prop flags %u not yet supported\n", prop->u.s.Flags);
776 return S_FALSE;
777 }
778
779 if (data_len < sizeof(DWORD))
781
782 FIXME("Unknown property %s\n", debugstr_guid(&prop->u.s.Set));
783 *(DWORD*)data = FALSE;
784 *ret_len = sizeof(DWORD);
785
786 return S_OK;
787}
#define FALSE
Definition: types.h:117
#define KSPROPERTY_TYPE_GET
Definition: dmksctrl.h:42
unsigned long DWORD
Definition: ntddk_ex.h:95
#define debugstr_guid
Definition: kernel32.h:35
#define DWORD
Definition: nt_native.h:44
ULONG Id
Definition: dmksctrl.h:77
ULONG Flags
Definition: dmksctrl.h:78
GUID Set
Definition: dmksctrl.h:76
#define S_FALSE
Definition: winerror.h:2357
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:2345

◆ IKsControlImpl_QueryInterface()

static HRESULT WINAPI IKsControlImpl_QueryInterface ( IKsControl iface,
REFIID  riid,
void **  ret_iface 
)
static

Definition at line 745 of file port.c.

747{
749
750 return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ret_iface);
751}
#define IDirectMusicPort_QueryInterface(p, a, b)
Definition: dmusicc.h:677

◆ IKsControlImpl_Release()

static ULONG WINAPI IKsControlImpl_Release ( IKsControl iface)
static

Definition at line 760 of file port.c.

761{
763
764 return IDirectMusicPort_Release(&This->IDirectMusicPort_iface);
765}
#define IDirectMusicPort_Release(p)
Definition: dmusicc.h:679

◆ impl_from_IDirectMusicDownloadedInstrument()

static IDirectMusicDownloadedInstrumentImpl * impl_from_IDirectMusicDownloadedInstrument ( IDirectMusicDownloadedInstrument *  iface)
inlinestatic

◆ impl_from_IDirectMusicPort()

static struct midi_port * impl_from_IDirectMusicPort ( IDirectMusicPort *  iface)
inlinestatic

Definition at line 914 of file port.c.

915{
916 return CONTAINING_RECORD(iface, struct midi_port, IDirectMusicPort_iface);
917}

Referenced by midi_IDirectMusicPort_AddRef(), midi_IDirectMusicPort_GetLatencyClock(), midi_IDirectMusicPort_QueryInterface(), and midi_IDirectMusicPort_Release().

◆ impl_from_IDirectMusicThru()

static struct midi_port * impl_from_IDirectMusicThru ( IDirectMusicThru *  iface)
inlinestatic

Definition at line 1134 of file port.c.

1135{
1136 return CONTAINING_RECORD(iface, struct midi_port, IDirectMusicThru_iface);
1137}

Referenced by midi_IDirectMusicThru_AddRef(), midi_IDirectMusicThru_QueryInterface(), and midi_IDirectMusicThru_Release().

◆ impl_from_IKsControl()

static SynthPortImpl * impl_from_IKsControl ( IKsControl iface)
inlinestatic

Definition at line 67 of file port.c.

68{
69 return CONTAINING_RECORD(iface, SynthPortImpl, IKsControl_iface);
70}

Referenced by IKsControlImpl_AddRef(), IKsControlImpl_QueryInterface(), and IKsControlImpl_Release().

◆ impl_from_SynthPortImpl_IDirectMusicPort()

◆ impl_from_SynthPortImpl_IDirectMusicPortDownload()

◆ impl_from_SynthPortImpl_IDirectMusicThru()

static SynthPortImpl * impl_from_SynthPortImpl_IDirectMusicThru ( IDirectMusicThru *  iface)
inlinestatic

◆ midi_IDirectMusicPort_Activate()

static HRESULT WINAPI midi_IDirectMusicPort_Activate ( IDirectMusicPort *  iface,
BOOL  active 
)
static

Definition at line 1072 of file port.c.

1073{
1074 FIXME("(%p, %u) stub!\n", iface, active);
1075
1076 return S_OK;
1077}

◆ midi_IDirectMusicPort_AddRef()

static ULONG WINAPI midi_IDirectMusicPort_AddRef ( IDirectMusicPort *  iface)
static

Definition at line 941 of file port.c.

942{
945
946 TRACE("(%p) ref = %u\n", iface, ref);
947
948 return ref;
949}
static struct midi_port * impl_from_IDirectMusicPort(IDirectMusicPort *iface)
Definition: port.c:914
LONG ref
Definition: port.c:910

◆ midi_IDirectMusicPort_Compact()

static HRESULT WINAPI midi_IDirectMusicPort_Compact ( IDirectMusicPort *  iface)
static

Definition at line 1032 of file port.c.

1033{
1034 FIXME("(%p) stub!\n", iface);
1035
1036 return E_NOTIMPL;
1037}

◆ midi_IDirectMusicPort_DeviceIoControl()

static HRESULT WINAPI midi_IDirectMusicPort_DeviceIoControl ( IDirectMusicPort *  iface,
DWORD  io_control_code,
void in,
DWORD  size_in,
void out,
DWORD  size_out,
DWORD ret_len,
OVERLAPPED overlapped 
)
static

Definition at line 1046 of file port.c.

1049{
1050 FIXME("(%p, %u, %p, %u, %p, %u, %p, %p) stub!\n", iface, io_control_code, in, size_in, out
1051 , size_out, ret_len, overlapped);
1052
1053 return E_NOTIMPL;
1054}
GLuint in
Definition: glext.h:9616
static FILE * out
Definition: regtests2xml.c:44
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED * overlapped
Definition: sock.c:81

◆ midi_IDirectMusicPort_DownloadInstrument()

static HRESULT WINAPI midi_IDirectMusicPort_DownloadInstrument ( IDirectMusicPort *  iface,
IDirectMusicInstrument *  instrument,
IDirectMusicDownloadedInstrument **  downloaded,
DMUS_NOTERANGE ranges,
DWORD  num_ranges 
)
static

Definition at line 991 of file port.c.

994{
995 FIXME("(%p, %p, %p, %p, %u) stub!\n", iface, instrument, downloaded, ranges, num_ranges);
996
997 return E_NOTIMPL;
998}

◆ midi_IDirectMusicPort_GetCaps()

static HRESULT WINAPI midi_IDirectMusicPort_GetCaps ( IDirectMusicPort *  iface,
DMUS_PORTCAPS caps 
)
static

Definition at line 1039 of file port.c.

1040{
1041 FIXME("(%p, %p) stub!\n", iface, caps);
1042
1043 return E_NOTIMPL;
1044}

◆ midi_IDirectMusicPort_GetChannelPriority()

static HRESULT WINAPI midi_IDirectMusicPort_GetChannelPriority ( IDirectMusicPort *  iface,
DWORD  channel_group,
DWORD  channel,
DWORD priority 
)
static

Definition at line 1087 of file port.c.

1089{
1090 FIXME("(%p, %u, %u, %p) stub!\n", iface, channel_group, channel, priority);
1091
1092 return E_NOTIMPL;
1093}
static int priority
Definition: timer.c:163

◆ midi_IDirectMusicPort_GetFormat()

static HRESULT WINAPI midi_IDirectMusicPort_GetFormat ( IDirectMusicPort *  iface,
WAVEFORMATEX format,
DWORD format_size,
DWORD buffer_size 
)
static

Definition at line 1103 of file port.c.

1105{
1106 FIXME("(%p, %p, %p, %p) stub!\n", iface, format, format_size, buffer_size);
1107
1108 return E_NOTIMPL;
1109}
void format_size(uint64_t size, wstring &s, bool show_bytes)
Definition: main.cpp:65
Definition: format.c:58
static void buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
Definition: swimpl.c:888

◆ midi_IDirectMusicPort_GetLatencyClock()

static HRESULT WINAPI midi_IDirectMusicPort_GetLatencyClock ( IDirectMusicPort *  iface,
IReferenceClock **  clock 
)
static

Definition at line 1008 of file port.c.

1010{
1011 struct midi_port *This = impl_from_IDirectMusicPort(iface);
1012
1013 TRACE("(%p, %p)\n", iface, clock);
1014
1015 if (!clock)
1016 return E_POINTER;
1017
1018 *clock = This->clock;
1020
1021 return S_OK;
1022}
#define IReferenceClock_AddRef(p)
Definition: dmusicc.h:751
_Check_return_ _CRTIMP clock_t __cdecl clock(void)
Definition: clock.c:23
#define E_POINTER
Definition: winerror.h:2365

◆ midi_IDirectMusicPort_GetNumChannelGroups()

static HRESULT WINAPI midi_IDirectMusicPort_GetNumChannelGroups ( IDirectMusicPort *  iface,
DWORD cgroups 
)
static

Definition at line 1064 of file port.c.

1066{
1067 FIXME("(%p, %p) stub!\n", iface, cgroups);
1068
1069 return E_NOTIMPL;
1070}

◆ midi_IDirectMusicPort_GetRunningStats()

static HRESULT WINAPI midi_IDirectMusicPort_GetRunningStats ( IDirectMusicPort *  iface,
DMUS_SYNTHSTATS stats 
)
static

Definition at line 1024 of file port.c.

1026{
1027 FIXME("(%p, %p) stub!\n", iface, stats);
1028
1029 return E_NOTIMPL;
1030}

◆ midi_IDirectMusicPort_PlayBuffer()

static HRESULT WINAPI midi_IDirectMusicPort_PlayBuffer ( IDirectMusicPort *  iface,
IDirectMusicBuffer *  buffer 
)
static

Definition at line 967 of file port.c.

969{
970 FIXME("(%p, %p) stub!\n", iface, buffer);
971
972 return E_NOTIMPL;
973}
GLuint buffer
Definition: glext.h:5915

◆ midi_IDirectMusicPort_QueryInterface()

static HRESULT WINAPI midi_IDirectMusicPort_QueryInterface ( IDirectMusicPort *  iface,
REFIID  riid,
void **  ret_iface 
)
static

Definition at line 919 of file port.c.

921{
923
924 TRACE("(%p, %s, %p)\n", iface, debugstr_dmguid(riid), ret_iface);
925
926 if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDirectMusicPort))
927 *ret_iface = iface;
928 else if (IsEqualIID(riid, &IID_IDirectMusicThru))
929 *ret_iface = &This->IDirectMusicThru_iface;
930 else {
931 WARN("no interface for %s\n", debugstr_dmguid(riid));
932 *ret_iface = NULL;
933 return E_NOINTERFACE;
934 }
935
936 IUnknown_AddRef((IUnknown *)*ret_iface);
937
938 return S_OK;
939}

◆ midi_IDirectMusicPort_Read()

static HRESULT WINAPI midi_IDirectMusicPort_Read ( IDirectMusicPort *  iface,
IDirectMusicBuffer *  buffer 
)
static

Definition at line 983 of file port.c.

985{
986 FIXME("(%p, %p) stub!\n", iface, buffer);
987
988 return E_NOTIMPL;
989}

◆ midi_IDirectMusicPort_Release()

static ULONG WINAPI midi_IDirectMusicPort_Release ( IDirectMusicPort *  iface)
static

Definition at line 951 of file port.c.

952{
955
956 TRACE("(%p) ref = %u\n", iface, ref);
957
958 if (!ref) {
959 if (This->clock)
962 }
963
964 return ref;
965}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define IReferenceClock_Release(p)
Definition: dmusicc.h:752

◆ midi_IDirectMusicPort_SetChannelPriority()

static HRESULT WINAPI midi_IDirectMusicPort_SetChannelPriority ( IDirectMusicPort *  iface,
DWORD  channel_group,
DWORD  channel,
DWORD  priority 
)
static

Definition at line 1079 of file port.c.

1081{
1082 FIXME("(%p, %u, %u, %u) stub!\n", iface, channel_group, channel, priority);
1083
1084 return E_NOTIMPL;
1085}

◆ midi_IDirectMusicPort_SetDirectSound()

static HRESULT WINAPI midi_IDirectMusicPort_SetDirectSound ( IDirectMusicPort *  iface,
IDirectSound *  dsound,
IDirectSoundBuffer *  dsbuffer 
)
static

Definition at line 1095 of file port.c.

1097{
1098 FIXME("(%p, %p, %p) stub!\n", iface, dsound, dsbuffer);
1099
1100 return E_NOTIMPL;
1101}

◆ midi_IDirectMusicPort_SetNumChannelGroups()

static HRESULT WINAPI midi_IDirectMusicPort_SetNumChannelGroups ( IDirectMusicPort *  iface,
DWORD  cgroups 
)
static

Definition at line 1056 of file port.c.

1058{
1059 FIXME("(%p, %u) stub!\n", iface, cgroups);
1060
1061 return E_NOTIMPL;
1062}

◆ midi_IDirectMusicPort_SetReadNotificationHandle()

static HRESULT WINAPI midi_IDirectMusicPort_SetReadNotificationHandle ( IDirectMusicPort *  iface,
HANDLE  event 
)
static

Definition at line 975 of file port.c.

977{
978 FIXME("(%p, %p) stub!\n", iface, event);
979
980 return S_OK;
981}

◆ midi_IDirectMusicPort_UnloadInstrument()

static HRESULT WINAPI midi_IDirectMusicPort_UnloadInstrument ( IDirectMusicPort *  iface,
IDirectMusicDownloadedInstrument *  downloaded 
)
static

Definition at line 1000 of file port.c.

1002{
1003 FIXME("(%p, %p) stub!\n", iface, downloaded);
1004
1005 return E_NOTIMPL;
1006}

◆ midi_IDirectMusicThru_AddRef()

static ULONG WINAPI midi_IDirectMusicThru_AddRef ( IDirectMusicThru *  iface)
static

Definition at line 1147 of file port.c.

1148{
1149 struct midi_port *This = impl_from_IDirectMusicThru(iface);
1150
1151 return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface);
1152}
static struct midi_port * impl_from_IDirectMusicThru(IDirectMusicThru *iface)
Definition: port.c:1134

◆ midi_IDirectMusicThru_QueryInterface()

static HRESULT WINAPI midi_IDirectMusicThru_QueryInterface ( IDirectMusicThru *  iface,
REFIID  riid,
void **  ret_iface 
)
static

Definition at line 1139 of file port.c.

1141{
1142 struct midi_port *This = impl_from_IDirectMusicThru(iface);
1143
1144 return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ret_iface);
1145}

◆ midi_IDirectMusicThru_Release()

static ULONG WINAPI midi_IDirectMusicThru_Release ( IDirectMusicThru *  iface)
static

Definition at line 1154 of file port.c.

1155{
1156 struct midi_port *This = impl_from_IDirectMusicThru(iface);
1157
1158 return IDirectMusicPort_Release(&This->IDirectMusicPort_iface);
1159}

◆ midi_IDirectMusicThru_ThruChannel()

static HRESULT WINAPI midi_IDirectMusicThru_ThruChannel ( IDirectMusicThru *  iface,
DWORD  src_group,
DWORD  src_channel,
DWORD  dest_group,
DWORD  dest_channel,
IDirectMusicPort *  dest_port 
)
static

Definition at line 1161 of file port.c.

1163{
1164 FIXME("(%p, %u, %u, %u, %u, %p) stub!\n", iface, src_group, src_channel, dest_group,
1165 dest_channel, dest_port);
1166
1167 return S_OK;
1168}

◆ midi_in_port_create()

HRESULT midi_in_port_create ( IDirectMusic8Impl parent,
DMUS_PORTPARAMS params,
DMUS_PORTCAPS caps,
IDirectMusicPort **  port 
)

Definition at line 1209 of file port.c.

1211{
1212 TRACE("(%p, %p, %p, %p)\n", parent, params, caps, port);
1213
1214 return midi_port_create(parent, params, caps, port);
1215}
static HRESULT midi_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *params, DMUS_PORTCAPS *caps, IDirectMusicPort **port)
Definition: port.c:1177
USHORT port
Definition: uri.c:228
r parent
Definition: btrfs.c:3010
GLenum const GLfloat * params
Definition: glext.h:5645

Referenced by create_system_ports_list().

◆ midi_out_port_create()

HRESULT midi_out_port_create ( IDirectMusic8Impl parent,
DMUS_PORTPARAMS params,
DMUS_PORTCAPS caps,
IDirectMusicPort **  port 
)

Definition at line 1201 of file port.c.

1203{
1204 TRACE("(%p, %p, %p, %p)\n", parent, params, caps, port);
1205
1206 return midi_port_create(parent, params, caps, port);
1207}

Referenced by create_system_ports_list().

◆ midi_port_create()

static HRESULT midi_port_create ( IDirectMusic8Impl parent,
DMUS_PORTPARAMS params,
DMUS_PORTCAPS caps,
IDirectMusicPort **  port 
)
static

Definition at line 1177 of file port.c.

1179{
1180 struct midi_port *obj;
1181 HRESULT hr;
1182
1183 if (!(obj = heap_alloc_zero(sizeof(*obj))))
1184 return E_OUTOFMEMORY;
1185
1186 obj->IDirectMusicPort_iface.lpVtbl = &midi_port_vtbl;
1187 obj->IDirectMusicThru_iface.lpVtbl = &midi_thru_vtbl;
1188 obj->ref = 1;
1189
1190 hr = DMUSIC_CreateReferenceClockImpl(&IID_IReferenceClock, (void **)&obj->clock, NULL);
1191 if (hr != S_OK) {
1193 return hr;
1194 }
1195
1196 *port = &obj->IDirectMusicPort_iface;
1197
1198 return S_OK;
1199}
HRESULT DMUSIC_CreateReferenceClockImpl(LPCGUID riid, LPVOID *ret_iface, LPUNKNOWN unkouter)
Definition: clock.c:121
static const IDirectMusicPortVtbl midi_port_vtbl
Definition: port.c:1111
static const IDirectMusicThruVtbl midi_thru_vtbl
Definition: port.c:1170
HRESULT hr
Definition: shlfolder.c:183

Referenced by midi_in_port_create(), and midi_out_port_create().

◆ synth_dmport_Activate()

static HRESULT WINAPI synth_dmport_Activate ( IDirectMusicPort *  iface,
BOOL  active 
)
static

Definition at line 441 of file port.c.

442{
444
445 FIXME("(%p/%p)->(%d): semi-stub\n", iface, This, active);
446
447 if (This->active == active)
448 return S_FALSE;
449
450 if (active) {
451 /* Acquire the dsound */
452 if (!This->dsound) {
453 IDirectSound_AddRef(This->parent->dsound);
454 This->dsound = This->parent->dsound;
455 }
456 IDirectSound_AddRef(This->dsound);
457 } else {
458 /* Release the dsound */
459 IDirectSound_Release(This->dsound);
460 IDirectSound_Release(This->parent->dsound);
461 if (This->dsound == This->parent->dsound)
462 This->dsound = NULL;
463 }
464
465 This->active = active;
466
467 return S_OK;
468}
static SynthPortImpl * impl_from_SynthPortImpl_IDirectMusicPort(IDirectMusicPort *iface)
Definition: port.c:52
#define IDirectSound_AddRef(p)
Definition: dsound.h:452
#define IDirectSound_Release(p)
Definition: dsound.h:453

◆ synth_dmport_SetDirectSound()

static HRESULT WINAPI synth_dmport_SetDirectSound ( IDirectMusicPort *  iface,
IDirectSound *  dsound,
IDirectSoundBuffer *  dsbuffer 
)
static

Definition at line 496 of file port.c.

498{
500
501 FIXME("(%p/%p)->(%p, %p): semi-stub\n", iface, This, dsound, dsbuffer);
502
503 if (This->active)
505
506 if (This->dsound) {
507 if (This->dsound != This->parent->dsound)
508 ERR("Not the same dsound in the port (%p) and parent dmusic (%p), expect trouble!\n",
509 This->dsound, This->parent->dsound);
510 if (!IDirectSound_Release(This->parent->dsound))
511 This->parent->dsound = NULL;
512 }
513 if (This->dsbuffer)
515
516 This->dsound = dsound;
517 This->dsbuffer = dsbuffer;
518
519 if (This->dsound)
520 IDirectSound_AddRef(This->dsound);
521 if (This->dsbuffer)
523
524 return S_OK;
525}
#define ERR(fmt,...)
Definition: precomp.h:57
#define DMUS_E_DSOUND_ALREADY_SET
Definition: dmerror.h:99
#define IDirectSoundBuffer_AddRef(p)
Definition: dsound.h:573
#define IDirectSoundBuffer_Release(p)
Definition: dsound.h:574

◆ synth_port_create()

HRESULT synth_port_create ( IDirectMusic8Impl parent,
DMUS_PORTPARAMS port_params,
DMUS_PORTCAPS port_caps,
IDirectMusicPort **  port 
)

Internal factory

Definition at line 814 of file port.c.

816{
818 HRESULT hr = E_FAIL;
819 int i;
820
821 TRACE("(%p, %p, %p)\n", port_params, port_caps, port);
822
823 *port = NULL;
824
826 if (!obj)
827 return E_OUTOFMEMORY;
828
829 obj->IDirectMusicPort_iface.lpVtbl = &SynthPortImpl_DirectMusicPort_Vtbl;
830 obj->IDirectMusicPortDownload_iface.lpVtbl = &SynthPortImpl_DirectMusicPortDownload_Vtbl;
831 obj->IDirectMusicThru_iface.lpVtbl = &SynthPortImpl_DirectMusicThru_Vtbl;
832 obj->IKsControl_iface.lpVtbl = &ikscontrol_vtbl;
833 obj->ref = 1;
834 obj->parent = parent;
835 obj->active = FALSE;
836 obj->params = *port_params;
837 obj->caps = *port_caps;
838
839 hr = DMUSIC_CreateReferenceClockImpl(&IID_IReferenceClock, (LPVOID*)&obj->pLatencyClock, NULL);
840 if (hr != S_OK)
841 {
843 return hr;
844 }
845
846 if (SUCCEEDED(hr))
847 hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynth, (void**)&obj->synth);
848
849 if (SUCCEEDED(hr))
850 hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynthSink, (void**)&obj->synth_sink);
851
852 if (SUCCEEDED(hr))
853 hr = IDirectMusicSynth_SetMasterClock(obj->synth, obj->pLatencyClock);
854
855 if (SUCCEEDED(hr))
856 hr = IDirectMusicSynthSink_SetMasterClock(obj->synth_sink, obj->pLatencyClock);
857
858 if (SUCCEEDED(hr))
859 hr = IDirectMusicSynth_SetSynthSink(obj->synth, obj->synth_sink);
860
861 if (SUCCEEDED(hr))
862 hr = IDirectMusicSynth_Open(obj->synth, port_params);
863
864 if (0)
865 {
866 if (port_params->dwValidParams & DMUS_PORTPARAMS_CHANNELGROUPS) {
867 obj->nrofgroups = port_params->dwChannelGroups;
868 /* Setting default priorities */
869 for (i = 0; i < obj->nrofgroups; i++) {
870 TRACE ("Setting default channel priorities on channel group %i\n", i + 1);
871 obj->group[i].channel[0].priority = DAUD_CHAN1_DEF_VOICE_PRIORITY;
872 obj->group[i].channel[1].priority = DAUD_CHAN2_DEF_VOICE_PRIORITY;
873 obj->group[i].channel[2].priority = DAUD_CHAN3_DEF_VOICE_PRIORITY;
874 obj->group[i].channel[3].priority = DAUD_CHAN4_DEF_VOICE_PRIORITY;
875 obj->group[i].channel[4].priority = DAUD_CHAN5_DEF_VOICE_PRIORITY;
876 obj->group[i].channel[5].priority = DAUD_CHAN6_DEF_VOICE_PRIORITY;
877 obj->group[i].channel[6].priority = DAUD_CHAN7_DEF_VOICE_PRIORITY;
878 obj->group[i].channel[7].priority = DAUD_CHAN8_DEF_VOICE_PRIORITY;
879 obj->group[i].channel[8].priority = DAUD_CHAN9_DEF_VOICE_PRIORITY;
880 obj->group[i].channel[9].priority = DAUD_CHAN10_DEF_VOICE_PRIORITY;
881 obj->group[i].channel[10].priority = DAUD_CHAN11_DEF_VOICE_PRIORITY;
882 obj->group[i].channel[11].priority = DAUD_CHAN12_DEF_VOICE_PRIORITY;
883 obj->group[i].channel[12].priority = DAUD_CHAN13_DEF_VOICE_PRIORITY;
884 obj->group[i].channel[13].priority = DAUD_CHAN14_DEF_VOICE_PRIORITY;
885 obj->group[i].channel[14].priority = DAUD_CHAN15_DEF_VOICE_PRIORITY;
886 obj->group[i].channel[15].priority = DAUD_CHAN16_DEF_VOICE_PRIORITY;
887 }
888 }
889 }
890
891 if (SUCCEEDED(hr)) {
892 *port = &obj->IDirectMusicPort_iface;
893 return S_OK;
894 }
895
896 if (obj->synth)
898 if (obj->synth_sink)
900 if (obj->pLatencyClock)
901 IReferenceClock_Release(obj->pLatencyClock);
903
904 return hr;
905}
#define E_FAIL
Definition: ddrawi.h:102
static const IDirectMusicThruVtbl SynthPortImpl_DirectMusicThru_Vtbl
Definition: port.c:736
static const IDirectMusicPortVtbl SynthPortImpl_DirectMusicPort_Vtbl
Definition: port.c:572
static const IDirectMusicPortDownloadVtbl SynthPortImpl_DirectMusicPortDownload_Vtbl
Definition: port.c:683
static const IKsControlVtbl ikscontrol_vtbl
Definition: port.c:805
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define DMUS_PORTPARAMS_CHANNELGROUPS
Definition: dmusicc.h:205
#define IDirectMusicSynth_Release(p)
Definition: dmusics.h:108
#define IDirectMusicSynth_SetSynthSink(p, a)
Definition: dmusics.h:121
#define IDirectMusicSynthSink_Release(p)
Definition: dmusics.h:225
#define IDirectMusicSynth_Open(p, a)
Definition: dmusics.h:110
#define IDirectMusicSynth_SetMasterClock(p, a)
Definition: dmusics.h:118
#define IDirectMusicSynthSink_SetMasterClock(p, a)
Definition: dmusics.h:228
#define DAUD_CHAN16_DEF_VOICE_PRIORITY
Definition: dmusprop.h:182
#define DAUD_CHAN4_DEF_VOICE_PRIORITY
Definition: dmusprop.h:170
#define DAUD_CHAN13_DEF_VOICE_PRIORITY
Definition: dmusprop.h:179
#define DAUD_CHAN9_DEF_VOICE_PRIORITY
Definition: dmusprop.h:175
#define DAUD_CHAN14_DEF_VOICE_PRIORITY
Definition: dmusprop.h:180
#define DAUD_CHAN5_DEF_VOICE_PRIORITY
Definition: dmusprop.h:171
#define DAUD_CHAN7_DEF_VOICE_PRIORITY
Definition: dmusprop.h:173
#define DAUD_CHAN6_DEF_VOICE_PRIORITY
Definition: dmusprop.h:172
#define DAUD_CHAN10_DEF_VOICE_PRIORITY
Definition: dmusprop.h:176
#define DAUD_CHAN8_DEF_VOICE_PRIORITY
Definition: dmusprop.h:174
#define DAUD_CHAN3_DEF_VOICE_PRIORITY
Definition: dmusprop.h:169
#define DAUD_CHAN1_DEF_VOICE_PRIORITY
Definition: dmusprop.h:167
#define DAUD_CHAN2_DEF_VOICE_PRIORITY
Definition: dmusprop.h:168
#define DAUD_CHAN15_DEF_VOICE_PRIORITY
Definition: dmusprop.h:181
#define DAUD_CHAN11_DEF_VOICE_PRIORITY
Definition: dmusprop.h:177
#define DAUD_CHAN12_DEF_VOICE_PRIORITY
Definition: dmusprop.h:178
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define SUCCEEDED(hr)
Definition: intsafe.h:50
DWORD dwValidParams
Definition: dmusicc.h:315
DWORD dwChannelGroups
Definition: dmusicc.h:317

Referenced by create_system_ports_list().

◆ SynthPortImpl_IDirectMusicPort_AddRef()

static ULONG WINAPI SynthPortImpl_IDirectMusicPort_AddRef ( LPDIRECTMUSICPORT  iface)
static

Definition at line 177 of file port.c.

178{
181
182 TRACE("(%p)->(): new ref = %u\n", This, ref);
183
185
186 return ref;
187}

◆ SynthPortImpl_IDirectMusicPort_Compact()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_Compact ( LPDIRECTMUSICPORT  iface)
static

Definition at line 389 of file port.c.

390{
392
393 FIXME("(%p/%p)->(): stub\n", iface, This);
394
395 return S_OK;
396}

◆ SynthPortImpl_IDirectMusicPort_DeviceIoControl()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_DeviceIoControl ( LPDIRECTMUSICPORT  iface,
DWORD  io_control_code,
LPVOID  in_buffer,
DWORD  in_buffer_size,
LPVOID  out_buffer,
DWORD  out_buffer_size,
LPDWORD  bytes_returned,
LPOVERLAPPED  overlapped 
)
static

Definition at line 409 of file port.c.

411{
413
414 FIXME("(%p/%p)->(%d, %p, %d, %p, %d, %p, %p): stub\n", iface, This, io_control_code, in_buffer, in_buffer_size, out_buffer, out_buffer_size, bytes_returned, overlapped);
415
416 return S_OK;
417}
static unsigned char * in_buffer
Definition: iccvid.c:87
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID ULONG PVOID out_buffer
Definition: file.c:100

◆ SynthPortImpl_IDirectMusicPort_DownloadInstrument()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_DownloadInstrument ( LPDIRECTMUSICPORT  iface,
IDirectMusicInstrument *  instrument,
IDirectMusicDownloadedInstrument **  downloaded_instrument,
DMUS_NOTERANGE note_ranges,
DWORD  num_note_ranges 
)
static

Definition at line 262 of file port.c.

263{
265 IDirectMusicInstrumentImpl *instrument_object;
266 HRESULT ret;
267 BOOL free;
268 HANDLE download;
271 DMUS_INSTRUMENT *instrument_info;
272 BYTE *data;
274 ULONG nb_regions;
275 ULONG size;
276 ULONG i;
277
278 TRACE("(%p/%p)->(%p, %p, %p, %d)\n", iface, This, instrument, downloaded_instrument, note_ranges, num_note_ranges);
279
280 if (!instrument || !downloaded_instrument || (num_note_ranges && !note_ranges))
281 return E_POINTER;
282
283 instrument_object = impl_from_IDirectMusicInstrument(instrument);
284
285 nb_regions = instrument_object->header.cRegions;
286 size = sizeof(DMUS_DOWNLOADINFO) + sizeof(ULONG) * (1 + nb_regions) + sizeof(DMUS_INSTRUMENT) + sizeof(DMUS_REGION) * nb_regions;
287
289 if (!data)
290 return E_OUTOFMEMORY;
291
294 offset = sizeof(DMUS_DOWNLOADINFO) + sizeof(ULONG) * (1 + nb_regions);
295
297 info->dwDLId = 0;
298 info->dwNumOffsetTableEntries = 1 + instrument_object->header.cRegions;
299 info->cbSize = size;
300
301 offset_table->ulOffsetTable[0] = offset;
302 instrument_info = (DMUS_INSTRUMENT*)(data + offset);
303 offset += sizeof(DMUS_INSTRUMENT);
304 instrument_info->ulPatch = MIDILOCALE2Patch(&instrument_object->header.Locale);
305 instrument_info->ulFirstRegionIdx = 1;
306 instrument_info->ulGlobalArtIdx = 0; /* FIXME */
307 instrument_info->ulFirstExtCkIdx = 0; /* FIXME */
308 instrument_info->ulCopyrightIdx = 0; /* FIXME */
309 instrument_info->ulFlags = 0; /* FIXME */
310
311 for (i = 0; i < nb_regions; i++)
312 {
313 DMUS_REGION *region = (DMUS_REGION*)(data + offset);
314
315 offset_table->ulOffsetTable[1 + i] = offset;
316 offset += sizeof(DMUS_REGION);
317 region->RangeKey = instrument_object->regions[i].header.RangeKey;
318 region->RangeVelocity = instrument_object->regions[i].header.RangeVelocity;
319 region->fusOptions = instrument_object->regions[i].header.fusOptions;
320 region->usKeyGroup = instrument_object->regions[i].header.usKeyGroup;
321 region->ulRegionArtIdx = 0; /* FIXME */
322 region->ulNextRegionIdx = i != (nb_regions - 1) ? (i + 2) : 0;
323 region->ulFirstExtCkIdx = 0; /* FIXME */
324 region->WaveLink = instrument_object->regions[i].wave_link;
325 region->WSMP = instrument_object->regions[i].wave_sample;
326 region->WLOOP[0] = instrument_object->regions[i].wave_loop;
327 }
328
329 ret = IDirectMusicSynth8_Download(This->synth, &download, (VOID*)data, &free);
330
331 if (SUCCEEDED(ret))
333
334 if (SUCCEEDED(ret))
335 {
336 IDirectMusicDownloadedInstrumentImpl *downloaded_object = impl_from_IDirectMusicDownloadedInstrument(*downloaded_instrument);
337
338 downloaded_object->data = data;
339 downloaded_object->downloaded = TRUE;
340 }
341
342 *downloaded_instrument = NULL;
344
345 return E_FAIL;
346}
#define free
Definition: debug_ros.c:5
#define TRUE
Definition: types.h:120
static HRESULT DMUSIC_CreateDirectMusicDownloadedInstrumentImpl(IDirectMusicDownloadedInstrument **instrument)
Definition: port.c:131
#define DMUS_DOWNLOADINFO_INSTRUMENT2
Definition: dmdls.h:8
struct _DMUS_DOWNLOADINFO DMUS_DOWNLOADINFO
struct _DMUS_REGION DMUS_REGION
struct _DMUS_INSTRUMENT DMUS_INSTRUMENT
DWORD MIDILOCALE2Patch(const MIDILOCALE *pLocale)
Definition: dmusic_main.c:195
static IDirectMusicInstrumentImpl * impl_from_IDirectMusicInstrument(IDirectMusicInstrument *iface)
#define IDirectMusicSynth8_Download(p, a, b, c)
Definition: dmusics.h:176
unsigned int BOOL
Definition: ntddk_ex.h:94
GLsizeiptr size
Definition: glext.h:5919
GLintptr offset
Definition: glext.h:5920
instrument_region * regions
ULONG ulFlags
Definition: dmdls.h:85
ULONG ulFirstRegionIdx
Definition: dmdls.h:81
ULONG ulPatch
Definition: dmdls.h:80
ULONG ulGlobalArtIdx
Definition: dmdls.h:82
ULONG ulFirstExtCkIdx
Definition: dmdls.h:83
ULONG ulCopyrightIdx
Definition: dmdls.h:84
WSMPL WSMP
Definition: dmdls.h:98
ULONG ulNextRegionIdx
Definition: dmdls.h:95
USHORT usKeyGroup
Definition: dmdls.h:93
ULONG ulRegionArtIdx
Definition: dmdls.h:94
WLOOP WLOOP[1]
Definition: dmdls.h:99
RGNRANGE RangeKey
Definition: dmdls.h:90
WAVELINK WaveLink
Definition: dmdls.h:97
RGNRANGE RangeVelocity
Definition: dmdls.h:91
USHORT fusOptions
Definition: dmdls.h:92
ULONG ulFirstExtCkIdx
Definition: dmdls.h:96
MIDILOCALE Locale
Definition: dls1.h:103
ULONG cRegions
Definition: dls1.h:102
USHORT usKeyGroup
Definition: dls1.h:128
RGNRANGE RangeVelocity
Definition: dls1.h:126
USHORT fusOptions
Definition: dls1.h:127
RGNRANGE RangeKey
Definition: dls1.h:125
int ret
unsigned char BYTE
Definition: xxhash.c:193

◆ SynthPortImpl_IDirectMusicPort_GetCaps()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetCaps ( LPDIRECTMUSICPORT  iface,
LPDMUS_PORTCAPS  port_caps 
)
static

Definition at line 398 of file port.c.

399{
401
402 TRACE("(%p/%p)->(%p)\n", iface, This, port_caps);
403
404 *port_caps = This->caps;
405
406 return S_OK;
407}

◆ SynthPortImpl_IDirectMusicPort_GetChannelPriority()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetChannelPriority ( LPDIRECTMUSICPORT  iface,
DWORD  channel_group,
DWORD  channel,
LPDWORD  priority 
)
static

Definition at line 485 of file port.c.

486{
488
489 TRACE("(%p/%p)->(%u, %u, %p)\n", iface, This, channel_group, channel, priority);
490
491 *priority = This->group[channel_group - 1].channel[channel].priority;
492
493 return S_OK;
494}

◆ SynthPortImpl_IDirectMusicPort_GetFormat()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetFormat ( LPDIRECTMUSICPORT  iface,
LPWAVEFORMATEX  pWaveFormatEx,
LPDWORD  pdwWaveFormatExSize,
LPDWORD  pdwBufferSize 
)
static

Definition at line 527 of file port.c.

528{
531 FIXME("(%p, %p, %p, %p): stub\n", This, pWaveFormatEx, pdwWaveFormatExSize, pdwBufferSize);
532
533 if (pWaveFormatEx == NULL)
534 {
535 if (pdwWaveFormatExSize)
536 *pdwWaveFormatExSize = sizeof(format);
537 else
538 return E_POINTER;
539 }
540 else
541 {
542 if (pdwWaveFormatExSize == NULL)
543 return E_POINTER;
544
545 /* Just fill this in with something that will not crash Direct Sound for now. */
546 /* It won't be used anyway until Performances are completed */
547 format.wFormatTag = WAVE_FORMAT_PCM;
548 format.nChannels = 2; /* This->params.dwAudioChannels; */
549 format.nSamplesPerSec = 44100; /* This->params.dwSampleRate; */
550 format.wBitsPerSample = 16; /* FIXME: check this */
551 format.nBlockAlign = (format.wBitsPerSample * format.nChannels) / 8;
552 format.nAvgBytesPerSec = format.nSamplesPerSec * format.nBlockAlign;
553 format.cbSize = 0;
554
555 if (*pdwWaveFormatExSize >= sizeof(format))
556 {
557 CopyMemory(pWaveFormatEx, &format, min(sizeof(format), *pdwWaveFormatExSize));
558 *pdwWaveFormatExSize = sizeof(format); /* FIXME check if this is set */
559 }
560 else
561 return E_POINTER; /* FIXME find right error */
562 }
563
564 if (pdwBufferSize)
565 *pdwBufferSize = 44100 * 2 * 2;
566 else
567 return E_POINTER;
568
569 return S_OK;
570}
#define WAVE_FORMAT_PCM
Definition: constants.h:425
#define min(a, b)
Definition: monoChain.cc:55
#define CopyMemory
Definition: winbase.h:1710

◆ SynthPortImpl_IDirectMusicPort_GetLatencyClock()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetLatencyClock ( LPDIRECTMUSICPORT  iface,
IReferenceClock **  clock 
)
static

Definition at line 368 of file port.c.

369{
371
372 TRACE("(%p/%p)->(%p)\n", iface, This, clock);
373
374 *clock = This->pLatencyClock;
376
377 return S_OK;
378}

◆ SynthPortImpl_IDirectMusicPort_GetNumChannelGroups()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetNumChannelGroups ( LPDIRECTMUSICPORT  iface,
LPDWORD  channel_groups 
)
static

Definition at line 430 of file port.c.

431{
433
434 TRACE("(%p/%p)->(%p)\n", iface, This, channel_groups);
435
436 *channel_groups = This->nrofgroups;
437
438 return S_OK;
439}

◆ SynthPortImpl_IDirectMusicPort_GetRunningStats()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetRunningStats ( LPDIRECTMUSICPORT  iface,
LPDMUS_SYNTHSTATS  stats 
)
static

Definition at line 380 of file port.c.

381{
383
384 FIXME("(%p/%p)->(%p): stub\n", iface, This, stats);
385
386 return S_OK;
387}

◆ SynthPortImpl_IDirectMusicPort_PlayBuffer()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_PlayBuffer ( LPDIRECTMUSICPORT  iface,
LPDIRECTMUSICBUFFER  buffer 
)
static

Definition at line 217 of file port.c.

218{
220 HRESULT hr;
222 LPBYTE data;
223 DWORD size;
224
225 TRACE("(%p/%p)->(%p)\n", iface, This, buffer);
226
227 if (!buffer)
228 return E_POINTER;
229
231
232 if (SUCCEEDED(hr))
234
235 if (SUCCEEDED(hr))
237
238 if (SUCCEEDED(hr))
240
241 return hr;
242}
#define IDirectMusicBuffer_GetStartTime(p, a)
Definition: dmusicc.h:497
#define IDirectMusicBuffer_GetUsedBytes(p, a)
Definition: dmusicc.h:498
#define IDirectMusicBuffer_GetRawBufferPtr(p, a)
Definition: dmusicc.h:496
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
#define IDirectMusicSynth_PlayBuffer(p, a, b, c)
Definition: dmusics.h:115
__u16 time
Definition: mkdosfs.c:8
unsigned char * LPBYTE
Definition: typedefs.h:53

◆ SynthPortImpl_IDirectMusicPort_QueryInterface()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_QueryInterface ( LPDIRECTMUSICPORT  iface,
REFIID  riid,
LPVOID ret_iface 
)
static

Definition at line 152 of file port.c.

153{
155
156 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid), ret_iface);
157
158 if (IsEqualIID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPort))
159 *ret_iface = &This->IDirectMusicPort_iface;
160 else if (IsEqualGUID(riid, &IID_IDirectMusicPortDownload))
161 *ret_iface = &This->IDirectMusicPortDownload_iface;
162 else if (IsEqualGUID(riid, &IID_IDirectMusicThru))
163 *ret_iface = &This->IDirectMusicThru_iface;
164 else if (IsEqualGUID(riid, &IID_IKsControl))
165 *ret_iface = &This->IKsControl_iface;
166 else {
167 WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ret_iface);
168 *ret_iface = NULL;
169 return E_NOINTERFACE;
170 }
171
172 IUnknown_AddRef((IUnknown*)*ret_iface);
173
174 return S_OK;
175}
const GUID IID_IKsControl
Definition: filter.c:44
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147

◆ SynthPortImpl_IDirectMusicPort_Read()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_Read ( LPDIRECTMUSICPORT  iface,
LPDIRECTMUSICBUFFER  buffer 
)
static

Definition at line 253 of file port.c.

254{
256
257 FIXME("(%p/%p)->(%p): stub\n", iface, This, buffer);
258
259 return S_OK;
260}

◆ SynthPortImpl_IDirectMusicPort_Release()

static ULONG WINAPI SynthPortImpl_IDirectMusicPort_Release ( LPDIRECTMUSICPORT  iface)
static

Definition at line 189 of file port.c.

190{
193
194 TRACE("(%p)->(): new ref = %u\n", This, ref);
195
196 if (!ref)
197 {
198 dmusic_remove_port(This->parent, iface);
203 IReferenceClock_Release(This->pLatencyClock);
204 if (This->dsbuffer)
206 if (This->dsound)
207 IDirectSound_Release(This->dsound);
209 }
210
212
213 return ref;
214}
void dmusic_remove_port(IDirectMusic8Impl *dmusic, IDirectMusicPort *port)
Definition: dmusic.c:300
#define IDirectMusicSynth_Close(p)
Definition: dmusics.h:111
#define IDirectMusicSynth_Activate(p, a)
Definition: dmusics.h:120

◆ SynthPortImpl_IDirectMusicPort_SetChannelPriority()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetChannelPriority ( LPDIRECTMUSICPORT  iface,
DWORD  channel_group,
DWORD  channel,
DWORD  priority 
)
static

Definition at line 470 of file port.c.

471{
473
474 FIXME("(%p/%p)->(%d, %d, %d): semi-stub\n", iface, This, channel_group, channel, priority);
475
476 if (channel > 16)
477 {
478 WARN("isn't there supposed to be 16 channels (no. %d requested)?! (faking as it is ok)\n", channel);
479 /*return E_INVALIDARG;*/
480 }
481
482 return S_OK;
483}

◆ SynthPortImpl_IDirectMusicPort_SetNumChannelGroups()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetNumChannelGroups ( LPDIRECTMUSICPORT  iface,
DWORD  channel_groups 
)
static

Definition at line 419 of file port.c.

420{
422
423 FIXME("(%p/%p)->(%d): semi-stub\n", iface, This, channel_groups);
424
425 This->nrofgroups = channel_groups;
426
427 return S_OK;
428}

◆ SynthPortImpl_IDirectMusicPort_SetReadNotificationHandle()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetReadNotificationHandle ( LPDIRECTMUSICPORT  iface,
HANDLE  event 
)
static

Definition at line 244 of file port.c.

245{
247
248 FIXME("(%p/%p)->(%p): stub\n", iface, This, event);
249
250 return S_OK;
251}

◆ SynthPortImpl_IDirectMusicPort_UnloadInstrument()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_UnloadInstrument ( LPDIRECTMUSICPORT  iface,
IDirectMusicDownloadedInstrument *  downloaded_instrument 
)
static

Definition at line 348 of file port.c.

349{
352
353 TRACE("(%p/%p)->(%p)\n", iface, This, downloaded_instrument);
354
355 if (!downloaded_instrument)
356 return E_POINTER;
357
358 if (!downloaded_object->downloaded)
360
361 HeapFree(GetProcessHeap(), 0, downloaded_object->data);
362 downloaded_object->data = NULL;
363 downloaded_object->downloaded = FALSE;
364
365 return S_OK;
366}
static IDirectMusicDownloadedInstrumentImpl * unsafe_impl_from_IDirectMusicDownloadedInstrument(IDirectMusicDownloadedInstrument *iface)
Definition: port.c:122
#define DMUS_E_NOT_DOWNLOADED_TO_PORT
Definition: dmerror.h:69

◆ SynthPortImpl_IDirectMusicPortDownload_AddRef()

static ULONG WINAPI SynthPortImpl_IDirectMusicPortDownload_AddRef ( LPDIRECTMUSICPORTDOWNLOAD  iface)
static

Definition at line 607 of file port.c.

608{
610
611 TRACE("(%p/%p)->()\n", iface, This);
612
613 return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface);
614}
static SynthPortImpl * impl_from_SynthPortImpl_IDirectMusicPortDownload(IDirectMusicPortDownload *iface)
Definition: port.c:57

◆ SynthPortImpl_IDirectMusicPortDownload_AllocateBuffer()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_AllocateBuffer ( LPDIRECTMUSICPORTDOWNLOAD  iface,
DWORD  size,
IDirectMusicDownload **  IDMDownload 
)
static

Definition at line 638 of file port.c.

639{
641
642 FIXME("(%p/%p)->(%u, %p): stub\n", iface, This, size, IDMDownload);
643
644 return S_OK;
645}

◆ SynthPortImpl_IDirectMusicPortDownload_Download()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_Download ( LPDIRECTMUSICPORTDOWNLOAD  iface,
IDirectMusicDownload *  IDMDownload 
)
static

Definition at line 665 of file port.c.

666{
668
669 FIXME("(%p/%p)->(%p): stub\n", iface, This, IDMDownload);
670
671 return S_OK;
672}

◆ SynthPortImpl_IDirectMusicPortDownload_GetAppend()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetAppend ( LPDIRECTMUSICPORTDOWNLOAD  iface,
DWORD append 
)
static

Definition at line 656 of file port.c.

657{
659
660 FIXME("(%p/%p)->(%p): stub\n", iface, This, append);
661
662 return S_OK;
663}
static void append(struct dump_context *dc, const void *data, unsigned size)
Definition: minidump.c:397

◆ SynthPortImpl_IDirectMusicPortDownload_GetBuffer()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetBuffer ( LPDIRECTMUSICPORTDOWNLOAD  iface,
DWORD  DLId,
IDirectMusicDownload **  IDMDownload 
)
static

Definition at line 626 of file port.c.

627{
629
630 FIXME("(%p/%p)->(%u, %p): stub\n", iface, This, DLId, IDMDownload);
631
632 if (!IDMDownload)
633 return E_POINTER;
634
635 return DMUSIC_CreateDirectMusicDownloadImpl(&IID_IDirectMusicDownload, (LPVOID*)IDMDownload, NULL);
636}
HRESULT DMUSIC_CreateDirectMusicDownloadImpl(LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN

◆ SynthPortImpl_IDirectMusicPortDownload_GetDLId()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetDLId ( LPDIRECTMUSICPORTDOWNLOAD  iface,
DWORD start_DLId,
DWORD  count 
)
static

Definition at line 647 of file port.c.

648{
650
651 FIXME("(%p/%p)->(%p, %u): stub\n", iface, This, start_DLId, count);
652
653 return S_OK;
654}
GLuint GLuint GLsizei count
Definition: gl.h:1545

◆ SynthPortImpl_IDirectMusicPortDownload_QueryInterface()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_QueryInterface ( LPDIRECTMUSICPORTDOWNLOAD  iface,
REFIID  riid,
LPVOID ret_iface 
)
static

Definition at line 598 of file port.c.

599{
601
602 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid), ret_iface);
603
604 return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ret_iface);
605}

◆ SynthPortImpl_IDirectMusicPortDownload_Release()

static ULONG WINAPI SynthPortImpl_IDirectMusicPortDownload_Release ( LPDIRECTMUSICPORTDOWNLOAD  iface)
static

Definition at line 616 of file port.c.

617{
619
620 TRACE("(%p/%p)->()\n", iface, This);
621
622 return IDirectMusicPort_Release(&This->IDirectMusicPort_iface);
623}

◆ SynthPortImpl_IDirectMusicPortDownload_Unload()

static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_Unload ( LPDIRECTMUSICPORTDOWNLOAD  iface,
IDirectMusicDownload *  IDMDownload 
)
static

Definition at line 674 of file port.c.

675{
677
678 FIXME("(%p/%p)->(%p): stub\n", iface, This, IDMDownload);
679
680 return S_OK;
681}

◆ SynthPortImpl_IDirectMusicThru_AddRef()

static ULONG WINAPI SynthPortImpl_IDirectMusicThru_AddRef ( LPDIRECTMUSICTHRU  iface)
static

Definition at line 707 of file port.c.

708{
710
711 TRACE("(%p/%p)->()\n", iface, This);
712
713 return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface);
714}
static SynthPortImpl * impl_from_SynthPortImpl_IDirectMusicThru(IDirectMusicThru *iface)
Definition: port.c:62

◆ SynthPortImpl_IDirectMusicThru_QueryInterface()

static HRESULT WINAPI SynthPortImpl_IDirectMusicThru_QueryInterface ( LPDIRECTMUSICTHRU  iface,
REFIID  riid,
LPVOID ret_iface 
)
static

Definition at line 698 of file port.c.

699{
701
702 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid), ret_iface);
703
704 return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ret_iface);
705}

◆ SynthPortImpl_IDirectMusicThru_Release()

static ULONG WINAPI SynthPortImpl_IDirectMusicThru_Release ( LPDIRECTMUSICTHRU  iface)
static

Definition at line 716 of file port.c.

717{
719
720 TRACE("(%p/%p)->()\n", iface, This);
721
722 return IDirectMusicPort_Release(&This->IDirectMusicPort_iface);
723}

◆ SynthPortImpl_IDirectMusicThru_ThruChannel()

static HRESULT WINAPI SynthPortImpl_IDirectMusicThru_ThruChannel ( LPDIRECTMUSICTHRU  iface,
DWORD  source_channel_group,
DWORD  source_channel,
DWORD  destination_channel_group,
DWORD  destination_channel,
LPDIRECTMUSICPORT  destination_port 
)
static

Definition at line 726 of file port.c.

728{
730
731 FIXME("(%p/%p)->(%d, %d, %d, %d, %p): stub\n", iface, This, source_channel_group, source_channel, destination_channel_group, destination_channel, destination_port);
732
733 return S_OK;
734}

◆ unsafe_impl_from_IDirectMusicDownloadedInstrument()

static IDirectMusicDownloadedInstrumentImpl * unsafe_impl_from_IDirectMusicDownloadedInstrument ( IDirectMusicDownloadedInstrument *  iface)
inlinestatic

Definition at line 122 of file port.c.

123{
124 if (!iface)
125 return NULL;
127
129}
#define assert(x)
Definition: debug.h:53

Referenced by SynthPortImpl_IDirectMusicPort_UnloadInstrument().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( dmusic  )

Variable Documentation

◆ DirectMusicDownloadedInstrument_Vtbl

const IDirectMusicDownloadedInstrumentVtbl DirectMusicDownloadedInstrument_Vtbl
static
Initial value:
= {
}
static ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_Release(LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface)
Definition: port.c:99
static HRESULT WINAPI IDirectMusicDownloadedInstrumentImpl_QueryInterface(IDirectMusicDownloadedInstrument *iface, REFIID riid, VOID **ret_iface)
Definition: port.c:73
static ULONG WINAPI IDirectMusicDownloadedInstrumentImpl_AddRef(LPDIRECTMUSICDOWNLOADEDINSTRUMENT iface)
Definition: port.c:89

Definition at line 116 of file port.c.

Referenced by DMUSIC_CreateDirectMusicDownloadedInstrumentImpl(), and unsafe_impl_from_IDirectMusicDownloadedInstrument().

◆ ikscontrol_vtbl

const IKsControlVtbl ikscontrol_vtbl
static
Initial value:
= {
}
static HRESULT WINAPI IKsControlImpl_KsMethod(IKsControl *iface, KSMETHOD *method, ULONG method_len, void *data, ULONG data_len, ULONG *ret_len)
Definition: port.c:789
static ULONG WINAPI IKsControlImpl_Release(IKsControl *iface)
Definition: port.c:760
static ULONG WINAPI IKsControlImpl_AddRef(IKsControl *iface)
Definition: port.c:753
static HRESULT WINAPI IKsControlImpl_KsProperty(IKsControl *iface, KSPROPERTY *prop, ULONG prop_len, void *data, ULONG data_len, ULONG *ret_len)
Definition: port.c:767
static HRESULT WINAPI IKsControlImpl_KsEvent(IKsControl *iface, KSEVENT *event, ULONG event_len, void *data, ULONG data_len, ULONG *ret_len)
Definition: port.c:797
static HRESULT WINAPI IKsControlImpl_QueryInterface(IKsControl *iface, REFIID riid, void **ret_iface)
Definition: port.c:745

Definition at line 805 of file port.c.

Referenced by synth_port_create().

◆ midi_port_vtbl

const IDirectMusicPortVtbl midi_port_vtbl
static
Initial value:
= {
}
static HRESULT WINAPI midi_IDirectMusicPort_DeviceIoControl(IDirectMusicPort *iface, DWORD io_control_code, void *in, DWORD size_in, void *out, DWORD size_out, DWORD *ret_len, OVERLAPPED *overlapped)
Definition: port.c:1046
static HRESULT WINAPI midi_IDirectMusicPort_SetChannelPriority(IDirectMusicPort *iface, DWORD channel_group, DWORD channel, DWORD priority)
Definition: port.c:1079
static HRESULT WINAPI midi_IDirectMusicPort_GetRunningStats(IDirectMusicPort *iface, DMUS_SYNTHSTATS *stats)
Definition: port.c:1024
static HRESULT WINAPI midi_IDirectMusicPort_Compact(IDirectMusicPort *iface)
Definition: port.c:1032
static HRESULT WINAPI midi_IDirectMusicPort_GetCaps(IDirectMusicPort *iface, DMUS_PORTCAPS *caps)
Definition: port.c:1039
static HRESULT WINAPI midi_IDirectMusicPort_GetLatencyClock(IDirectMusicPort *iface, IReferenceClock **clock)
Definition: port.c:1008
static HRESULT WINAPI midi_IDirectMusicPort_GetFormat(IDirectMusicPort *iface, WAVEFORMATEX *format, DWORD *format_size, DWORD *buffer_size)
Definition: port.c:1103
static HRESULT WINAPI midi_IDirectMusicPort_GetChannelPriority(IDirectMusicPort *iface, DWORD channel_group, DWORD channel, DWORD *priority)
Definition: port.c:1087
static ULONG WINAPI midi_IDirectMusicPort_AddRef(IDirectMusicPort *iface)
Definition: port.c:941
static HRESULT WINAPI midi_IDirectMusicPort_Activate(IDirectMusicPort *iface, BOOL active)
Definition: port.c:1072
static HRESULT WINAPI midi_IDirectMusicPort_SetReadNotificationHandle(IDirectMusicPort *iface, HANDLE event)
Definition: port.c:975
static HRESULT WINAPI midi_IDirectMusicPort_Read(IDirectMusicPort *iface, IDirectMusicBuffer *buffer)
Definition: port.c:983
static HRESULT WINAPI midi_IDirectMusicPort_SetDirectSound(IDirectMusicPort *iface, IDirectSound *dsound, IDirectSoundBuffer *dsbuffer)
Definition: port.c:1095
static HRESULT WINAPI midi_IDirectMusicPort_QueryInterface(IDirectMusicPort *iface, REFIID riid, void **ret_iface)
Definition: port.c:919
static HRESULT WINAPI midi_IDirectMusicPort_SetNumChannelGroups(IDirectMusicPort *iface, DWORD cgroups)
Definition: port.c:1056
static HRESULT WINAPI midi_IDirectMusicPort_DownloadInstrument(IDirectMusicPort *iface, IDirectMusicInstrument *instrument, IDirectMusicDownloadedInstrument **downloaded, DMUS_NOTERANGE *ranges, DWORD num_ranges)
Definition: port.c:991
static HRESULT WINAPI midi_IDirectMusicPort_GetNumChannelGroups(IDirectMusicPort *iface, DWORD *cgroups)
Definition: port.c:1064
static HRESULT WINAPI midi_IDirectMusicPort_UnloadInstrument(IDirectMusicPort *iface, IDirectMusicDownloadedInstrument *downloaded)
Definition: port.c:1000
static ULONG WINAPI midi_IDirectMusicPort_Release(IDirectMusicPort *iface)
Definition: port.c:951
static HRESULT WINAPI midi_IDirectMusicPort_PlayBuffer(IDirectMusicPort *iface, IDirectMusicBuffer *buffer)
Definition: port.c:967

Definition at line 1111 of file port.c.

Referenced by midi_port_create().

◆ midi_thru_vtbl

const IDirectMusicThruVtbl midi_thru_vtbl
static
Initial value:
= {
}
static HRESULT WINAPI midi_IDirectMusicThru_QueryInterface(IDirectMusicThru *iface, REFIID riid, void **ret_iface)
Definition: port.c:1139
static ULONG WINAPI midi_IDirectMusicThru_Release(IDirectMusicThru *iface)
Definition: port.c:1154
static ULONG WINAPI midi_IDirectMusicThru_AddRef(IDirectMusicThru *iface)
Definition: port.c:1147
static HRESULT WINAPI midi_IDirectMusicThru_ThruChannel(IDirectMusicThru *iface, DWORD src_group, DWORD src_channel, DWORD dest_group, DWORD dest_channel, IDirectMusicPort *dest_port)
Definition: port.c:1161

Definition at line 1170 of file port.c.

Referenced by midi_port_create().

◆ SynthPortImpl_DirectMusicPort_Vtbl

const IDirectMusicPortVtbl SynthPortImpl_DirectMusicPort_Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_PlayBuffer(LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER buffer)
Definition: port.c:217
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetCaps(LPDIRECTMUSICPORT iface, LPDMUS_PORTCAPS port_caps)
Definition: port.c:398
static ULONG WINAPI SynthPortImpl_IDirectMusicPort_AddRef(LPDIRECTMUSICPORT iface)
Definition: port.c:177
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetNumChannelGroups(LPDIRECTMUSICPORT iface, DWORD channel_groups)
Definition: port.c:419
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_QueryInterface(LPDIRECTMUSICPORT iface, REFIID riid, LPVOID *ret_iface)
Definition: port.c:152
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetLatencyClock(LPDIRECTMUSICPORT iface, IReferenceClock **clock)
Definition: port.c:368
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_UnloadInstrument(LPDIRECTMUSICPORT iface, IDirectMusicDownloadedInstrument *downloaded_instrument)
Definition: port.c:348
static HRESULT WINAPI synth_dmport_SetDirectSound(IDirectMusicPort *iface, IDirectSound *dsound, IDirectSoundBuffer *dsbuffer)
Definition: port.c:496
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_DownloadInstrument(LPDIRECTMUSICPORT iface, IDirectMusicInstrument *instrument, IDirectMusicDownloadedInstrument **downloaded_instrument, DMUS_NOTERANGE *note_ranges, DWORD num_note_ranges)
Definition: port.c:262
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetFormat(LPDIRECTMUSICPORT iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize)
Definition: port.c:527
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_DeviceIoControl(LPDIRECTMUSICPORT iface, DWORD io_control_code, LPVOID in_buffer, DWORD in_buffer_size, LPVOID out_buffer, DWORD out_buffer_size, LPDWORD bytes_returned, LPOVERLAPPED overlapped)
Definition: port.c:409
static ULONG WINAPI SynthPortImpl_IDirectMusicPort_Release(LPDIRECTMUSICPORT iface)
Definition: port.c:189
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_Compact(LPDIRECTMUSICPORT iface)
Definition: port.c:389
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetRunningStats(LPDIRECTMUSICPORT iface, LPDMUS_SYNTHSTATS stats)
Definition: port.c:380
static HRESULT WINAPI synth_dmport_Activate(IDirectMusicPort *iface, BOOL active)
Definition: port.c:441
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetNumChannelGroups(LPDIRECTMUSICPORT iface, LPDWORD channel_groups)
Definition: port.c:430
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_Read(LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER buffer)
Definition: port.c:253
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetReadNotificationHandle(LPDIRECTMUSICPORT iface, HANDLE event)
Definition: port.c:244
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetChannelPriority(LPDIRECTMUSICPORT iface, DWORD channel_group, DWORD channel, LPDWORD priority)
Definition: port.c:485
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetChannelPriority(LPDIRECTMUSICPORT iface, DWORD channel_group, DWORD channel, DWORD priority)
Definition: port.c:470

Definition at line 572 of file port.c.

Referenced by synth_port_create().

◆ SynthPortImpl_DirectMusicPortDownload_Vtbl

const IDirectMusicPortDownloadVtbl SynthPortImpl_DirectMusicPortDownload_Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_AllocateBuffer(LPDIRECTMUSICPORTDOWNLOAD iface, DWORD size, IDirectMusicDownload **IDMDownload)
Definition: port.c:638
static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_Download(LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload *IDMDownload)
Definition: port.c:665
static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_QueryInterface(LPDIRECTMUSICPORTDOWNLOAD iface, REFIID riid, LPVOID *ret_iface)
Definition: port.c:598
static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetAppend(LPDIRECTMUSICPORTDOWNLOAD iface, DWORD *append)
Definition: port.c:656
static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetBuffer(LPDIRECTMUSICPORTDOWNLOAD iface, DWORD DLId, IDirectMusicDownload **IDMDownload)
Definition: port.c:626
static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_Unload(LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload *IDMDownload)
Definition: port.c:674
static ULONG WINAPI SynthPortImpl_IDirectMusicPortDownload_Release(LPDIRECTMUSICPORTDOWNLOAD iface)
Definition: port.c:616
static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetDLId(LPDIRECTMUSICPORTDOWNLOAD iface, DWORD *start_DLId, DWORD count)
Definition: port.c:647
static ULONG WINAPI SynthPortImpl_IDirectMusicPortDownload_AddRef(LPDIRECTMUSICPORTDOWNLOAD iface)
Definition: port.c:607

Definition at line 683 of file port.c.

Referenced by synth_port_create().

◆ SynthPortImpl_DirectMusicThru_Vtbl

const IDirectMusicThruVtbl SynthPortImpl_DirectMusicThru_Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI SynthPortImpl_IDirectMusicThru_ThruChannel(LPDIRECTMUSICTHRU iface, DWORD source_channel_group, DWORD source_channel, DWORD destination_channel_group, DWORD destination_channel, LPDIRECTMUSICPORT destination_port)
Definition: port.c:726
static HRESULT WINAPI SynthPortImpl_IDirectMusicThru_QueryInterface(LPDIRECTMUSICTHRU iface, REFIID riid, LPVOID *ret_iface)
Definition: port.c:698
static ULONG WINAPI SynthPortImpl_IDirectMusicThru_Release(LPDIRECTMUSICTHRU iface)
Definition: port.c:716
static ULONG WINAPI SynthPortImpl_IDirectMusicThru_AddRef(LPDIRECTMUSICTHRU iface)
Definition: port.c:707

Definition at line 736 of file port.c.

Referenced by synth_port_create().