mirror of
https://github.com/reactos/reactos.git
synced 2024-07-06 20:55:16 +00:00
Added GETDEVCAPS support for MIDI, mixer and aux devices, within MME Buddy
and sndblst.dll - this just lets you see the device names etc. but adds no extra functionality apart from this. svn path=/trunk/; revision=39717
This commit is contained in:
parent
141ec3a682
commit
63a2507150
|
@ -20,8 +20,13 @@
|
||||||
#include <mment4.h>
|
#include <mment4.h>
|
||||||
//#include <debug.h>
|
//#include <debug.h>
|
||||||
|
|
||||||
PWSTR SBWaveOutDeviceName = L"ROS Sound Blaster Out";
|
/* TODO: Give individual device names if someone has > 1 card */
|
||||||
PWSTR SBWaveInDeviceName = L"ROS Sound Blaster In";
|
PWSTR SBWaveOutDeviceName = L"ROS Sound Blaster Wave Out";
|
||||||
|
PWSTR SBWaveInDeviceName = L"ROS Sound Blaster Wave In";
|
||||||
|
PWSTR SBMidiOutDeviceName = L"ROS Sound Blaster Midi Out";
|
||||||
|
PWSTR SBMidiInDeviceName = L"ROS Sound Blaster Midi In";
|
||||||
|
PWSTR SBAuxDeviceName = L"ROS Sound Blaster Aux";
|
||||||
|
PWSTR SBMixerDeviceName = L"ROS Sound Blaster Mixer";
|
||||||
/* TODO: Mixer etc */
|
/* TODO: Mixer etc */
|
||||||
|
|
||||||
MMRESULT
|
MMRESULT
|
||||||
|
@ -64,6 +69,30 @@ GetSoundBlasterDeviceCapabilities(
|
||||||
CopyWideString(WaveInCaps->szPname, SBWaveInDeviceName);
|
CopyWideString(WaveInCaps->szPname, SBWaveInDeviceName);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case MIDI_OUT_DEVICE_TYPE :
|
||||||
|
{
|
||||||
|
LPMIDIOUTCAPS MidiOutCaps = (LPMIDIOUTCAPS) Capabilities;
|
||||||
|
CopyWideString(MidiOutCaps->szPname, SBMidiOutDeviceName);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case MIDI_IN_DEVICE_TYPE :
|
||||||
|
{
|
||||||
|
LPMIDIINCAPS MidiInCaps = (LPMIDIINCAPS) Capabilities;
|
||||||
|
CopyWideString(MidiInCaps->szPname, SBMidiInDeviceName);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case AUX_DEVICE_TYPE :
|
||||||
|
{
|
||||||
|
LPAUXCAPS AuxCaps = (LPAUXCAPS) Capabilities;
|
||||||
|
CopyWideString(AuxCaps->szPname, SBAuxDeviceName);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case MIXER_DEVICE_TYPE :
|
||||||
|
{
|
||||||
|
LPMIXERCAPS MixerCaps = (LPMIXERCAPS) Capabilities;
|
||||||
|
CopyWideString(MixerCaps->szPname, SBMixerDeviceName);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return MMSYSERR_NOERROR;
|
return MMSYSERR_NOERROR;
|
||||||
|
|
|
@ -54,6 +54,8 @@ GetSoundDeviceCapabilities(
|
||||||
if ( ! MMSUCCESS(Result) )
|
if ( ! MMSUCCESS(Result) )
|
||||||
return TranslateInternalMmResult(Result);
|
return TranslateInternalMmResult(Result);
|
||||||
|
|
||||||
|
SND_ASSERT( IS_VALID_SOUND_DEVICE_TYPE(DeviceType) );
|
||||||
|
|
||||||
/* Check that the capabilities structure is of a valid size */
|
/* Check that the capabilities structure is of a valid size */
|
||||||
switch ( DeviceType )
|
switch ( DeviceType )
|
||||||
{
|
{
|
||||||
|
@ -77,10 +79,15 @@ GetSoundDeviceCapabilities(
|
||||||
GoodSize = CapabilitiesSize >= sizeof(MIDIINCAPS);
|
GoodSize = CapabilitiesSize >= sizeof(MIDIINCAPS);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* TODO: Others... */
|
case AUX_DEVICE_TYPE :
|
||||||
default :
|
|
||||||
{
|
{
|
||||||
SND_ASSERT(FALSE);
|
GoodSize = CapabilitiesSize >= sizeof(AUXCAPS);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case MIXER_DEVICE_TYPE :
|
||||||
|
{
|
||||||
|
GoodSize = CapabilitiesSize >= sizeof(MIXERCAPS);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -60,11 +60,12 @@ MmeGetSoundDeviceCapabilities(
|
||||||
|
|
||||||
SND_TRACE(L"MME *_GETCAPS for device %d of type %d\n", DeviceId, DeviceType);
|
SND_TRACE(L"MME *_GETCAPS for device %d of type %d\n", DeviceId, DeviceType);
|
||||||
|
|
||||||
/* FIXME: Validate device type and ID */
|
/* FIXME: Validate device ID */
|
||||||
VALIDATE_MMSYS_PARAMETER( Capabilities );
|
VALIDATE_MMSYS_PARAMETER( Capabilities );
|
||||||
VALIDATE_MMSYS_PARAMETER( CapabilitiesSize > 0 );
|
VALIDATE_MMSYS_PARAMETER( IS_VALID_SOUND_DEVICE_TYPE(DeviceType) );
|
||||||
|
|
||||||
/* Our parameter checks are done elsewhere */
|
/* Our parameter checks are done elsewhere */
|
||||||
|
|
||||||
Result = GetSoundDevice(DeviceType, DeviceId, &SoundDevice);
|
Result = GetSoundDevice(DeviceType, DeviceId, &SoundDevice);
|
||||||
|
|
||||||
if ( ! MMSUCCESS(Result) )
|
if ( ! MMSUCCESS(Result) )
|
||||||
|
|
Loading…
Reference in a new issue