OH_AudioStream_Result OH_AudioStreamBuilder_Create(OH_AudioStreamBuilder **builder, OH_AudioStream_Type type) |
Creates an audio stream builder, which can be an audio renderer or capturer. |
OH_AudioStream_Result OH_AudioStreamBuilder_Destroy(OH_AudioStreamBuilder *builder) |
Destroys an audio stream builder. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetSamplingRate(OH_AudioStreamBuilder *builder, int32_t rate) |
Sets the sampling rate of an audio stream. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetChannelCount(OH_AudioStreamBuilder *builder, int32_t channelCount) |
Sets the number of channels for an audio stream. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetSampleFormat(OH_AudioStreamBuilder *builder, OH_AudioStream_SampleFormat format) |
Sets the sampling format of an audio stream. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetEncodingType(OH_AudioStreamBuilder *builder, OH_AudioStream_EncodingType encodingType) |
Sets the encoding type of an audio stream. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetLatencyMode(OH_AudioStreamBuilder *builder, OH_AudioStream_LatencyMode latencyMode) |
Sets the latency mode of an audio stream. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetChannelLayout(OH_AudioStreamBuilder *builder, OH_AudioChannelLayout channelLayout) |
Sets the channel layout for an audio stream. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererInfo(OH_AudioStreamBuilder *builder, OH_AudioStream_Usage usage) |
Sets the usage scenario of an audio renderer. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetVolumeMode (OH_AudioStreamBuilder *builder, OH_AudioStream_VolumeMode volumeMode) |
Sets the volume mode for an audio stream. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerInfo(OH_AudioStreamBuilder *builder, OH_AudioStream_SourceType sourceType) |
Sets the usage scenario of an audio capturer. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererCallback(OH_AudioStreamBuilder *builder, OH_AudioRenderer_Callbacks callbacks, void *userData) |
Sets callbacks for an audio renderer. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererOutputDeviceChangeCallback(OH_AudioStreamBuilder *builder, OH_AudioRenderer_OutputDeviceChangeCallback callback, void *userData) |
Sets the callback invoked when the audio stream device changes. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererPrivacy(OH_AudioStreamBuilder *builder, OH_AudioStream_PrivacyType privacy) |
Sets the privacy type for the audio stream being played. The privacy type specifies whether the audio stream can be recorded by other applications. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerCallback(OH_AudioStreamBuilder *builder, OH_AudioCapturer_Callbacks callbacks, void *userData) |
Sets callbacks for an audio capturer. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetWriteDataWithMetadataCallback(OH_AudioStreamBuilder *builder, OH_AudioRenderer_WriteDataWithMetadataCallback callback, void *userData) |
Sets the callback used to write both audio data and metadata. |
OH_AudioStream_Result OH_AudioStreamBuilder_GenerateRenderer(OH_AudioStreamBuilder *builder, OH_AudioRenderer **audioRenderer) |
Creates an audio renderer instance. |
OH_AudioStream_Result OH_AudioStreamBuilder_GenerateCapturer(OH_AudioStreamBuilder *builder, OH_AudioCapturer **audioCapturer) |
Creates an audio capturer instance. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetFrameSizeInCallback(OH_AudioStreamBuilder *builder, int32_t frameSize) |
Sets the frame size for each callback during playback. The frame size must be at least equal to the size of the data processed by the audio hardware at a time and less than half of the internal buffer capacity. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererInterruptMode(OH_AudioStreamBuilder *builder, OH_AudioInterrupt_Mode mode) |
Sets the interrupt mode of the stream client. |
OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererWriteDataCallback(OH_AudioStreamBuilder *builder, OH_AudioRenderer_OnWriteDataCallback callback, void *userData) |
Sets the callback used to write audio data. |
OH_AudioStream_ResultOH_AudioStreamBuilder_SetRendererInterruptCallback (OH_AudioStreamBuilder *builder, OH_AudioRenderer_OnInterruptCallback callback, void *userData) |
Sets the callback for interruption events of an audio renderer. |
OH_AudioStream_ResultOH_AudioStreamBuilder_SetRendererErrorCallback (OH_AudioStreamBuilder *builder, OH_AudioRenderer_OnErrorCallback callback, void *userData) |
Sets the callback for error events of an audio renderer. |
OH_AudioStream_ResultOH_AudioStreamBuilder_SetCapturerReadDataCallback (OH_AudioStreamBuilder *builder, OH_AudioCapturer_OnReadDataCallback callback, void *userData) |
Sets the callback used to read data for an audio capturer. |
OH_AudioStream_ResultOH_AudioStreamBuilder_SetCapturerDeviceChangeCallback (OH_AudioStreamBuilder *builder, OH_AudioCapturer_OnDeviceChangeCallback callback, void *userData) |
Sets the callback for audio capturer device change events. |
OH_AudioStream_ResultOH_AudioStreamBuilder_SetCapturerInterruptCallback (OH_AudioStreamBuilder *builder, OH_AudioCapturer_OnInterruptCallback callback, void *userData) |
Sets the callback for interruption events of an audio capturer. |
OH_AudioStream_ResultOH_AudioStreamBuilder_SetCapturerErrorCallback (OH_AudioStreamBuilder *builder, OH_AudioCapturer_OnErrorCallback callback, void *userData) |
Sets the callback for error events of an audio capturer. |