native_audiocapturer.h

Overview

Declares the functions related to an audio capturer.

System capability: SystemCapability.Multimedia.Audio.Core

Since: 10

Related module: OHAudio

Summary

Functions

Name Description
OH_AudioStream_ResultOH_AudioCapturer_Release (OH_AudioCapturer *capturer) Releases an audio capturer.
OH_AudioStream_ResultOH_AudioCapturer_Start (OH_AudioCapturer *capturer) Starts an audio capturer.
OH_AudioStream_ResultOH_AudioCapturer_Pause (OH_AudioCapturer *capturer) Pauses an audio capturer.
OH_AudioStream_ResultOH_AudioCapturer_Stop (OH_AudioCapturer *capturer) Stops an audio capturer.
OH_AudioStream_ResultOH_AudioCapturer_Flush (OH_AudioCapturer *capturer) Flushes obtained audio data.
OH_AudioStream_ResultOH_AudioCapturer_GetCurrentState (OH_AudioCapturer *capturer, OH_AudioStream_State *state) Obtains the state of an audio capturer.
OH_AudioStream_ResultOH_AudioCapturer_GetLatencyMode (OH_AudioCapturer *capturer, OH_AudioStream_LatencyMode *latencyMode) Obtains the latency mode of an audio capturer.
OH_AudioStream_ResultOH_AudioCapturer_GetStreamId (OH_AudioCapturer *capturer, uint32_t *streamId) Obtains the stream ID of an audio capturer.
OH_AudioStream_ResultOH_AudioCapturer_GetSamplingRate (OH_AudioCapturer *capturer, int32_t *rate) Obtains the sampling rate of an audio capturer.
OH_AudioStream_ResultOH_AudioCapturer_GetChannelCount (OH_AudioCapturer *capturer, int32_t *channelCount) Obtains the number of channels for an audio capturer.
OH_AudioStream_ResultOH_AudioCapturer_GetSampleFormat (OH_AudioCapturer *capturer, OH_AudioStream_SampleFormat *sampleFormat) Obtains the sampling format of an audio capturer.
OH_AudioStream_ResultOH_AudioCapturer_GetEncodingType (OH_AudioCapturer *capturer, OH_AudioStream_EncodingType *encodingType) Obtains the encoding type of an audio capturer.
OH_AudioStream_ResultOH_AudioCapturer_GetCapturerInfo (OH_AudioCapturer *capturer, OH_AudioStream_SourceType *sourceType) Obtains the usage scenario of an audio capturer.
OH_AudioStream_ResultOH_AudioCapturer_GetFrameSizeInCallback (OH_AudioCapturer *capturer, int32_t *frameSize) Obtains the frame size in the callback.
OH_AudioStream_ResultOH_AudioCapturer_GetTimestamp (OH_AudioCapturer *capturer, clockid_t clockId, int64_t *framePosition, int64_t *timestamp) Obtains the timestamp and position information of an input audio stream.
OH_AudioStream_ResultOH_AudioCapturer_GetFramesRead (OH_AudioCapturer *capturer, int64_t *frames) Obtains the number of frames that have been read since the stream was created.