typedef struct _GLOBAL_SYNTH_INFO {
ULONG Key;
#define SYNTH_KEY (*(ULONG *)"Syn ")
INTERFACE_TYPE BusType;
ULONG BusNumber;
KMUTEX MidiMutex;
ULONG MemType;
PDEVICE_OBJECT DeviceObject;
PDRIVER_OBJECT DriverObject;
SOUND_DISPATCH_ROUTINE *DevCapsRoutine;
UCHAR DeviceInUse;
volatile BOOLEAN InterruptFired; // Interrupt fired?
BOOLEAN IsOpl3; // It's an OPL3
SYNTH_HARDWARE Hw; // Hardware specific stuff
} GLOBAL_SYNTH_INFO, *PGLOBAL_SYNTH_INFO;
The GLOBAL_SYNTH_INFO structure contains context information for a mixer device.
Members
Key
Internal only, for debugging. Should be “Syn “.
BusType
Bus type. INTERFACE_TYPE is defined in ntddk.h.
BusNumber
Bus number.
MidiMutex
Internal only. Mutex object used by soundlib.lib’s exclusion routine.
MemType
Memory type returned by SoundMapPortAddress.
DeviceObject
Pointer to device object returned by SoundCreateDevice.
DriverObject
Pointer to driver object received by DriverEntry.
DevCapsRoutine
Pointer to a driver-defined function that returns device capabilities. The function type is SOUND_DISPATCH_ROUTINE.
DeviceInUse
Internal only. Indicates device status.
InterruptFired
Set by driver if interrupt fired. Not set by soundlib.lib.
IsOpl3
Set if synthesizer is OPL3-compatible.
Hw
Hardware information. Member type is SYNTH_HARDWARE.
Comments
Allocate a GLOBAL_SYNTH_INFO structure from the nonpaged memory pool by calling ExAllocatePool, then zero it by calling RtlZeroMemory. The structure is initialized by code in SynthInit.