Home |
Function USBAudioSetFeature |
Function USBAudioSetFeatureUSBAudioSetFeature sets a feature value of a Feature Unit of an Audio function: int USBAudioSetFeature(int AudioID, UINT Feature, UINT Channel, int Value); ParametersAudioIDAudio ID value previously returned by function USBAudioGetInfo. FeatureThe type of feature to set (see USBAudioGetFeature). Optionally, flag USB_AUDIO_RAW may be ORed into this parameter. ChannelThe audio channel to set. For some features, channel 0 specifies a "master" channel, typically when a single feature value applies to all channels. Other devices/features will support a unique feature value for each implemented audio channel starting at channel index 1. RTUSB-32 defines special value USB_AUDIO_ALL_CHANNELS which causes this function to attempt to set the feature on all existing channels (including channel 0). return valueThe requested feature value or a negative error code in case of an error. If the audio function does not implement the requested feature/channel, RTU_NOT_AVAIL is returned. If optional flag USB_AUDIO_RAW is ORed into the Feature parameter, the Value parameter for features USB_AUDIO_VOLUME, USB_AUDIO_BASS, USB_AUDIO_MID, and USB_AUDIO_TREBLE is sent as is to the device. How these values are interpreted is defined in the USB Audio Specification. Initially, many USB Audio devices have an invalid or inappropriate volume level. Before an Audio function is used, it is recommended to set the USB_AUDIO_MUTE feature to 0 and the USB_AUDIO_VOLUME of all channels (e.g. using Channel parameter USB_AUDIO_ALL_CHANNELS) to a defined value. Please see function USBAudioGetFeature for a list of all supported feature selectors and supported value ranges.
|