harmony 鸿蒙native_audiostream_base.h

  • 2023-10-30
  • 浏览 (269)

native_audiostream_base.h

Overview

The native_audiostream_base.h file declares the basic data structure of OHAudio.

\@syscap SystemCapability.Multimedia.Audio.Core

Since

10

Related Modules

OHAudio

Summary

Structs

Name Description
OH_AudioRenderer_Callbacks_Struct Defines a pointer to the callback functions related to an audio renderer.
OH_AudioCapturer_Callbacks_Struct Defines a pointer to the callback functions related to an audio capturer.

Types

Name Description
OH_AudioStreamBuilder Defines an audio stream builder.
OH_AudioRenderer Defines an audio renderer.
OH_AudioCapturer Defines an audio capturer.
OH_AudioRenderer_Callbacks Defines a pointer to the callback functions related to an audio renderer.
OH_AudioCapturer_Callbacks Defines a pointer to the callback functions related to an audio capturer.

Enum

Name Description
OH_AudioStream_Result { AUDIOSTREAM_SUCCESS, AUDIOSTREAM_ERROR_INVALID_PARAM, AUDIOSTREAM_ERROR_ILLEGAL_STATE, AUDIOSTREAM_ERROR_SYSTEM } Enumerates the audio stream operation results.
OH_AudioStream_Type { AUDIOSTREAM_TYPE_RENDERER = 1, AUDIOSTREAM_TYPE_CAPTURER = 2 } Enumerates the audio stream types.
OH_AudioStream_SampleFormat { AUDIOSTREAM_SAMPLE_U8 = 0, AUDIOSTREAM_SAMPLE_S16LE = 1, AUDIOSTREAM_SAMPLE_S24LE = 2, AUDIOSTREAM_SAMPLE_S32LE = 3 } Enumerates the sampling formats of audio streams.
OH_AudioStream_EncodingType { AUDIOSTREAM_ENCODING_TYPE_RAW = 0 } Enumerates the encoding types of audio streams.
OH_AudioStream_Usage { AUDIOSTREAM_USAGE_UNKNOWN = 0, AUDIOSTREAM_USAGE_MUSIC = 1, AUDIOSTREAM_USAGE_COMMUNICATION = 2, AUDIOSTREAM_USAGE_GAME = 11 } Enumerates the usage scenarios of audio output streams.
OH_AudioStream_LatencyMode { AUDIOSTREAM_LATENCY_MODE_NORMAL = 0, AUDIOSTREAM_LATENCY_MODE_FAST = 1 } Enumerates the latency modes of audio streams.
OH_AudioStream_State {
AUDIOSTREAM_STATE_INVALID = -1, AUDIOSTREAM_STATE_PREPARED = 1, AUDIOSTREAM_STATE_RUNNING = 2, AUDIOSTREAM_STATE_STOPPED = 3,
AUDIOSTREAM_STATE_RELEASED = 4, AUDIOSTREAM_STATE_PAUSED = 5
}
Enumerates the audio stream states.
OH_AudioStream_SourceType { AUDIOSTREAM_SOURCE_TYPE_INVALID = -1, AUDIOSTREAM_SOURCE_TYPE_MIC, AUDIOSTREAM_SOURCE_TYPE_VOICE_RECOGNITION = 1, AUDIOSTREAM_SOURCE_TYPE_VOICE_COMMUNICATION = 7 } Enumerates the usage scenarios of audio input streams.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Native APIs

harmony 鸿蒙AVCapability

harmony 鸿蒙AVDemuxer

harmony 鸿蒙AVMuxer

harmony 鸿蒙AVScreenCapture

harmony 鸿蒙AVSource

harmony 鸿蒙AudioDecoder

harmony 鸿蒙AudioEncoder

harmony 鸿蒙CodecBase

harmony 鸿蒙Core

0  赞