mirror of
https://github.com/reactos/reactos.git
synced 2025-04-28 01:11:35 +00:00
[WDMAUD.DRV]
- Implement support of using mmixer wave in/out library functions (not yet used) - Not yet used - Remove DIGCF_PRESENT flag from device list as setupapi cannot handle this yet properly svn path=/trunk/; revision=44663
This commit is contained in:
parent
7615ef446e
commit
20608aeb5a
4 changed files with 107 additions and 4 deletions
|
@ -295,7 +295,7 @@ WdmAudInitUserModeMixer()
|
||||||
DeviceHandle = SetupDiGetClassDevs(&CategoryGuid,
|
DeviceHandle = SetupDiGetClassDevs(&CategoryGuid,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
DIGCF_DEVICEINTERFACE|DIGCF_PRESENT);
|
DIGCF_DEVICEINTERFACE/* FIXME |DIGCF_PRESENT*/);
|
||||||
|
|
||||||
if (DeviceHandle == INVALID_HANDLE_VALUE)
|
if (DeviceHandle == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
|
@ -408,3 +408,54 @@ WdmAudGetControlDetails(
|
||||||
|
|
||||||
return MMSYSERR_ERROR;
|
return MMSYSERR_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
WdmAudGetWaveOutCount()
|
||||||
|
{
|
||||||
|
return MMixerGetWaveOutCount(&MixerContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
WdmAudGetWaveInCount()
|
||||||
|
{
|
||||||
|
return MMixerGetWaveInCount(&MixerContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
MMRESULT
|
||||||
|
WdmAudGetWaveOutCapabilities(
|
||||||
|
IN ULONG DeviceId,
|
||||||
|
LPWAVEOUTCAPSW Capabilities)
|
||||||
|
{
|
||||||
|
if (MMixerWaveOutCapabilities(&MixerContext, DeviceId, Capabilities) == MM_STATUS_SUCCESS)
|
||||||
|
return MMSYSERR_NOERROR;
|
||||||
|
|
||||||
|
return MMSYSERR_ERROR;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
MMRESULT
|
||||||
|
WdmAudGetWaveInCapabilities(
|
||||||
|
IN ULONG DeviceId,
|
||||||
|
LPWAVEINCAPSW Capabilities)
|
||||||
|
{
|
||||||
|
if (MMixerWaveInCapabilities(&MixerContext, DeviceId, Capabilities) == MM_STATUS_SUCCESS)
|
||||||
|
return MMSYSERR_NOERROR;
|
||||||
|
|
||||||
|
return MMSYSERR_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
MMRESULT
|
||||||
|
WdmAudOpenWave(
|
||||||
|
OUT PHANDLE hPin,
|
||||||
|
IN DWORD DeviceId,
|
||||||
|
IN PWAVEFORMATEX WaveFormat,
|
||||||
|
IN DWORD bWaveIn)
|
||||||
|
{
|
||||||
|
if (MMixerOpenWave(&MixerContext, DeviceId, bWaveIn, WaveFormat, hPin) == MM_STATUS_SUCCESS)
|
||||||
|
{
|
||||||
|
//fixme
|
||||||
|
// start stream if waveout
|
||||||
|
return MMSYSERR_NOERROR;
|
||||||
|
}
|
||||||
|
return MMSYSERR_ERROR;
|
||||||
|
}
|
||||||
|
|
|
@ -44,7 +44,20 @@ GetNumWdmDevs(
|
||||||
{
|
{
|
||||||
#ifdef USE_MMIXER_LIB
|
#ifdef USE_MMIXER_LIB
|
||||||
|
|
||||||
|
switch(DeviceType)
|
||||||
|
{
|
||||||
|
case MIXER_DEVICE_TYPE:
|
||||||
*DeviceCount = WdmAudGetMixerCount();
|
*DeviceCount = WdmAudGetMixerCount();
|
||||||
|
break;
|
||||||
|
case WAVE_OUT_DEVICE_TYPE:
|
||||||
|
*DeviceCount = WdmAudGetWaveOutCount();
|
||||||
|
break;
|
||||||
|
case WAVE_IN_DEVICE_TYPE:
|
||||||
|
*DeviceCount = WdmAudGetWaveInCount();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
*DeviceCount = 0;
|
||||||
|
}
|
||||||
return MMSYSERR_NOERROR;
|
return MMSYSERR_NOERROR;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -106,8 +119,17 @@ GetWdmDeviceCapabilities(
|
||||||
#ifdef USE_MMIXER_LIB
|
#ifdef USE_MMIXER_LIB
|
||||||
if (DeviceType == MIXER_DEVICE_TYPE)
|
if (DeviceType == MIXER_DEVICE_TYPE)
|
||||||
{
|
{
|
||||||
return WdmAudGetMixerCapabilties(DeviceId, (LPMIXERCAPSW)Capabilities);
|
return WdmAudGetMixerCapabilities(DeviceId, (LPMIXERCAPSW)Capabilities);
|
||||||
}
|
}
|
||||||
|
else if (DeviceType == WAVE_OUT_DEVICE_TYPE)
|
||||||
|
{
|
||||||
|
return WdmAudGetWaveOutCapabilities(DeviceId, (LPWAVEOUTCAPSW)Capabilities);
|
||||||
|
}
|
||||||
|
else if (DeviceType == WAVE_IN_DEVICE_TYPE)
|
||||||
|
{
|
||||||
|
return WdmAudGetWaveInCapabilities(DeviceId, (LPWAVEINCAPSW)Capabilities);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -459,8 +481,13 @@ SetWdmWaveDeviceFormat(
|
||||||
return MMSYSERR_NOERROR;
|
return MMSYSERR_NOERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Result = GetSoundDeviceType(SoundDevice, &DeviceType);
|
Result = GetSoundDeviceType(SoundDevice, &DeviceType);
|
||||||
|
|
||||||
|
#ifdef USE_MMIXER_LIB
|
||||||
|
return WdmAudOpenWavePin(Instance, DeviceId, WaveFormat, DeviceType);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
SND_ASSERT( Result == MMSYSERR_NOERROR );
|
SND_ASSERT( Result == MMSYSERR_NOERROR );
|
||||||
|
|
||||||
ZeroMemory(&DeviceInfo, sizeof(WDMAUD_DEVICE_INFO));
|
ZeroMemory(&DeviceInfo, sizeof(WDMAUD_DEVICE_INFO));
|
||||||
|
|
|
@ -17,6 +17,12 @@
|
||||||
BOOL
|
BOOL
|
||||||
WdmAudInitUserModeMixer();
|
WdmAudInitUserModeMixer();
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
WdmAudGetWaveOutCount();
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
WdmAudGetWaveInCount();
|
||||||
|
|
||||||
ULONG
|
ULONG
|
||||||
WdmAudGetMixerCount();
|
WdmAudGetMixerCount();
|
||||||
|
|
||||||
|
@ -25,6 +31,16 @@ WdmAudGetMixerCapabilties(
|
||||||
IN ULONG DeviceId,
|
IN ULONG DeviceId,
|
||||||
LPMIXERCAPSW Capabilities);
|
LPMIXERCAPSW Capabilities);
|
||||||
|
|
||||||
|
MMRESULT
|
||||||
|
WdmAudGetWaveOutCapabilities(
|
||||||
|
IN ULONG DeviceId,
|
||||||
|
LPWAVEOUTCAPSW Capabilities);
|
||||||
|
|
||||||
|
MMRESULT
|
||||||
|
WdmAudGetWaveInCapabilities(
|
||||||
|
IN ULONG DeviceId,
|
||||||
|
LPWAVEINCAPSW Capabilities);
|
||||||
|
|
||||||
MMRESULT
|
MMRESULT
|
||||||
WdmAudCloseMixer(
|
WdmAudCloseMixer(
|
||||||
IN HMIXER Handle,
|
IN HMIXER Handle,
|
||||||
|
@ -36,6 +52,14 @@ WdmAudOpenMixer(
|
||||||
IN ULONG DeviceId,
|
IN ULONG DeviceId,
|
||||||
IN HANDLE hNotifyEvent);
|
IN HANDLE hNotifyEvent);
|
||||||
|
|
||||||
|
MMRESULT
|
||||||
|
WdmAudOpenWave(
|
||||||
|
OUT PHANDLE hPin,
|
||||||
|
IN DWORD DeviceId,
|
||||||
|
IN PWAVEFORMATEX WaveFormat,
|
||||||
|
IN DWORD bWaveIn);
|
||||||
|
|
||||||
|
|
||||||
MMRESULT
|
MMRESULT
|
||||||
WdmAudGetLineInfo(
|
WdmAudGetLineInfo(
|
||||||
IN HANDLE hMixer,
|
IN HANDLE hMixer,
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<library>msvcrt</library>
|
<library>msvcrt</library>
|
||||||
<library>mmixer</library>
|
<library>mmixer</library>
|
||||||
<library>setupapi</library>
|
<library>setupapi</library>
|
||||||
|
<library>ksuser</library>
|
||||||
<file>wdmaud.c</file>
|
<file>wdmaud.c</file>
|
||||||
<file>mixer.c</file>
|
<file>mixer.c</file>
|
||||||
<file>mmixer.c</file>
|
<file>mmixer.c</file>
|
||||||
|
|
Loading…
Reference in a new issue