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_StreamOpen Function
MPLAB Harmony USB Stack
USB_HOST_AUDIO_V1_StreamOpen Function

This function will open the specified audio stream. Once opened, the audio stream can be accessed via the handle that this function returns. The audiostreamingInterfaceObj parameter is the value returned in the USB_HOST_AUDIO_V1_StreamingInterfaceGetFirst or USB_HOST_AUDIO_V1_StreamingInterfaceGetNext functions.

C
USB_HOST_AUDIO_V1_STREAM_HANDLE USB_HOST_AUDIO_V1_StreamOpen(
    USB_HOST_AUDIO_V1_STREAMING_INTERFACE_OBJ audiostreamingInterfaceObj
);
Preconditions

The audio streaming interface object should be valid.

Parameters
Parameters 
Description 
audiostreamingInterfaceObj 
Audio streaming interface object 
Returns

Will return a valid handle if the audio stream could be opened successfully. Otherwise, USB_HOST_AUDIO_V1_RESULT_HANDLE_INVALID is returned. The function will return a valid handle if the stream is ready to be opened.

Remarks

None.