USB Libraries Help > USB Host Libraries > USB Audio v1.0 Host Client Driver Library > Library Interface > b) Audio Stream Access Functions > USB_HOST_AUDIO_V1_0_StreamEventHandlerSet Function
MPLAB Harmony USB Stack
USB_HOST_AUDIO_V1_0_StreamEventHandlerSet Function

This function registers a client specific Audio v1.0 stream event handler. The Audio v1.0 Host Client Driver will call appAudioHandler function specified as 2nd argument with relevant event and associate event data, in response to audio stream data transfers that have been scheduled by the client.

C
USB_HOST_AUDIO_V1_0_STREAM_RESULT USB_HOST_AUDIO_V1_0_StreamEventHandlerSet(
    USB_HOST_AUDIO_V1_0_STREAM_HANDLE handle, 
    USB_HOST_AUDIO_V1_0_STREAM_EVENT_HANDLER appAudioHandler, 
    uintptr_t context
);
Preconditions

None.

Parameters
Parameters 
Description 
handle 
A handle to the Audio v1.0 stream 
eventHandler 
A pointer to event handler function. If NULL, events will not be generated. 
context 
The application specific context that is returned in the event handler 
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.