Skip to main content

OH_AudioStreamBuilder_SetWriteDataWithMetadataCallback

Function OH_AudioStreamBuilder_SetWriteDataWithMetadataCallback 

Source
pub unsafe extern "C" fn OH_AudioStreamBuilder_SetWriteDataWithMetadataCallback(
    builder: *mut OH_AudioStreamBuilder,
    callback: OH_AudioRenderer_WriteDataWithMetadataCallback,
    userData: *mut c_void,
) -> OH_AudioStream_Result
Available on crate feature api-12 only.
Expand description

Set the callback of writing metadata to the renderer client

Available since API-level: 12

§Arguments

  • builder - Reference provided by OH_AudioStreamBuilder_Create()

  • callback - Callback to the functions that will write audio data with metadata to the renderer.

  • userData - Pointer to an application data structure that will be passed to the callback functions.

§Returns

  • Function result code: [AUDIOSTREAM_SUCCESS] If the execution is successful. [AUDIOSTREAM_ERROR_INVALID_PARAM]: 1.The param of builder is nullptr; 2.StreamType invalid.