Skip to main content

OH_AudioStreamBuilder_SetSampleFormat

Function OH_AudioStreamBuilder_SetSampleFormat 

Source
pub unsafe extern "C" fn OH_AudioStreamBuilder_SetSampleFormat(
    builder: *mut OH_AudioStreamBuilder,
    format: OH_AudioStream_SampleFormat,
) -> OH_AudioStream_Result
Expand description

Set the sample format of the stream client

Available since API-level: 10

§Arguments

  • builder - Reference provided by OH_AudioStreamBuilder_Create()

  • format - Sample data format.

§Returns

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