30 SND_TRACE(
L"Allocating a SOUND_DEVICE structure\n");
40 *SoundDevice = NewDevice;
54 SND_TRACE(
L"Freeing a SOUND_DEVICE structure");
101 while ( CurrentDevice )
103 if ( CurrentDevice == SoundDevice )
109 CurrentDevice = CurrentDevice->
Next;
146 SND_ERR(
L"Failed to allocate SOUND_DEVICE structure\n");
177 *SoundDevice = NewDevice;
199 PreviousDevice =
NULL;
202 while ( CurrentDevice )
204 if ( CurrentDevice == SoundDevice )
206 if ( ! PreviousDevice )
217 PreviousDevice->
Next = CurrentDevice->
Next;
220 if ( ! CurrentDevice->
Next )
228 PreviousDevice = CurrentDevice;
229 CurrentDevice = CurrentDevice->
Next;
295 DWORD CurrentIndex = 0;
309 for ( CurrentIndex = 0; CurrentIndex != DeviceIndex; ++ CurrentIndex )
312 CurrentDevice = CurrentDevice->
Next;
315 SND_TRACE(
L"Returning sound device %x\n", CurrentDevice);
317 *SoundDevice = CurrentDevice;
336 *Identifier = SoundDevice->Identifier;
static VOID FreeMemory(PCREATE_DATA Data)
MMRESULT GetSoundDevice(IN MMDEVICE_TYPE DeviceType, IN DWORD DeviceIndex, OUT PSOUND_DEVICE *SoundDevice)
MMRESULT GetSoundDeviceIdentifier(IN PSOUND_DEVICE SoundDevice, OUT PVOID *Identifier)
struct _SOUND_DEVICE_INSTANCE * TailInstance
MMRESULT SetSoundDeviceFunctionTable(IN PSOUND_DEVICE SoundDevice, IN PMMFUNCTION_TABLE FunctionTable)
#define MMSUCCESS(result)
MMRESULT UnlistSoundDevice(IN MMDEVICE_TYPE DeviceType, IN PSOUND_DEVICE SoundDevice)
PSOUND_DEVICE SoundDeviceListHeads[SOUND_DEVICE_TYPES]
#define VALIDATE_MMSYS_PARAMETER(parameter_condition)
VOID FreeSoundDevice(IN PSOUND_DEVICE SoundDevice)
MMRESULT ListSoundDevice(IN MMDEVICE_TYPE DeviceType, IN PVOID Identifier OPTIONAL, OUT PSOUND_DEVICE *SoundDevice OPTIONAL)
#define IsValidSoundDeviceType
MMRESULT GetSoundDeviceType(IN PSOUND_DEVICE SoundDevice, OUT PMMDEVICE_TYPE DeviceType)
#define SND_ASSERT(condition)
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
struct _SOUND_DEVICE_INSTANCE * HeadInstance
#define AllocateStruct(thing)
_In_ WDFCOLLECTION _In_ ULONG Index
BOOLEAN IsValidSoundDevice(IN PSOUND_DEVICE SoundDevice)
struct _SOUND_DEVICE * Next
#define MMSYSERR_BADDEVICEID
ULONG GetSoundDeviceCount(IN MMDEVICE_TYPE DeviceType)
PSOUND_DEVICE SoundDeviceListTails[SOUND_DEVICE_TYPES]
ULONG SoundDeviceCounts[SOUND_DEVICE_TYPES]
VOID UnlistAllSoundDevices()
MMRESULT UnlistSoundDevices(IN MMDEVICE_TYPE DeviceType)
#define SOUND_DEVICE_TYPE_TO_INDEX(x)
MMRESULT AllocateSoundDevice(IN MMDEVICE_TYPE DeviceType, OUT PSOUND_DEVICE *SoundDevice)
PULONG MinorVersion OPTIONAL