native_audiorenderer.h

Overview

Declares the functions related to an audio renderer.

System capability: SystemCapability.Multimedia.Audio.Core

Since: 10

Related module: OHAudio

Summary

Functions

Name Description
OH_AudioStream_Result OH_AudioRenderer_Release(OH_AudioRenderer *renderer) Releases an audio renderer.
OH_AudioStream_Result OH_AudioRenderer_Start(OH_AudioRenderer *renderer) Starts an audio renderer.
OH_AudioStream_Result OH_AudioRenderer_Pause(OH_AudioRenderer *renderer) Pauses an audio renderer.
OH_AudioStream_Result OH_AudioRenderer_Stop(OH_AudioRenderer *renderer) Stops an audio renderer.
OH_AudioStream_Result OH_AudioRenderer_Flush(OH_AudioRenderer *renderer) Flushes written audio data.
OH_AudioStream_Result OH_AudioRenderer_GetCurrentState(OH_AudioRenderer *renderer, OH_AudioStream_State *state) Obtains the state of an audio renderer.
OH_AudioStream_Result OH_AudioRenderer_GetSamplingRate(OH_AudioRenderer *renderer, int32_t *rate) Obtains the sampling rate of an audio renderer.
OH_AudioStream_Result OH_AudioRenderer_GetStreamId(OH_AudioRenderer *renderer, uint32_t *streamId) Obtains the stream ID of an audio renderer.
OH_AudioStream_Result OH_AudioRenderer_GetChannelCount(OH_AudioRenderer *renderer, int32_t *channelCount) Obtains the number of channels for an audio renderer.
OH_AudioStream_Result OH_AudioRenderer_GetSampleFormat(OH_AudioRenderer *renderer, OH_AudioStream_SampleFormat *sampleFormat) Obtains the sampling format of an audio renderer.
OH_AudioStream_Result OH_AudioRenderer_GetLatencyMode(OH_AudioRenderer *renderer, OH_AudioStream_LatencyMode *latencyMode) Obtains the latency mode of an audio renderer.
OH_AudioStream_Result OH_AudioRenderer_GetRendererInfo(OH_AudioRenderer *renderer, OH_AudioStream_Usage *usage) Obtains the usage scenario of an audio renderer.
OH_AudioStream_Result OH_AudioRenderer_GetEncodingType(OH_AudioRenderer *renderer, OH_AudioStream_EncodingType *encodingType) Obtains the encoding type of an audio renderer.
OH_AudioStream_Result OH_AudioRenderer_GetFramesWritten(OH_AudioRenderer *renderer, int64_t *frames) Obtains the number of frames that have been written since the stream was created.
OH_AudioStream_Result OH_AudioRenderer_GetTimestamp(OH_AudioRenderer *renderer, clockid_t clockId, int64_t *framePosition, int64_t *timestamp) Obtains the timestamp and position information of an output audio stream.
OH_AudioStream_Result OH_AudioRenderer_GetFrameSizeInCallback(OH_AudioRenderer *renderer, int32_t *frameSize) Obtains the frame size in the callback.