USB Libraries Help > USB Host Libraries > USB Audio v1.0 Host Client Driver Library > Library Interface > a) Audio Device Access Functions > USB_HOST_AUDIO_V1_0_StreamSamplingRateSet Function
MPLAB Harmony USB Stack
USB_HOST_AUDIO_V1_0_StreamSamplingRateSet Function

This function schedules an audio stream set sampling rate request for the specified audio stream. A USB_HOST_AUDIO_V1_0_STREAM_EVENT_SAMPLING_RATE_SET_COMPLETE event is generated when this request is completed. USB_HOST_AUDIO_V1_0_STREAM_EVENT_SAMPLING_RATE_SET_COMPLETE_DATA returns the status and request handle of the request.

C
USB_HOST_AUDIO_V1_0_STREAM_RESULT USB_HOST_AUDIO_V1_0_StreamSamplingRateSet(
    USB_HOST_AUDIO_V1_0_STREAM_HANDLE streamHandle, 
    USB_HOST_AUDIO_V1_0_REQUEST_HANDLE * requestHandle, 
    uint32_t * samplingRate
);
Preconditions

The audio stream should have been opened.

Parameters
Parameters 
Description 
streamHandle 
Handle to the Audio v1.0 stream 
requestHandle 
Handle to the stream set sampling rate request 
samplingRate 
Pointer to the sampling rate 
Returns
  • USB_HOST_AUDIO_V1_0_STREAM_RESULT_SUCCESS - The operation was successful
  • USB_HOST_AUDIO_V1_0_STREAM_RESULT_HANDLE_INVALID - The specified audio stream does not exist
  • USB_HOST_AUDIO_V1_0_STREAM_RESULT_FAILURE - An unknown failure occurred
Remarks

None.