openharmony 鸿蒙 capi-native-audiostream-base-h

2026-08-25 浏览 (1)

native_audiostream_base.h

Overview

The file declares the basic data structure of OHAudio.

File to include: <ohaudio/native_audiostream_base.h>

Library: libohaudio.so

System capability: SystemCapability.Multimedia.Audio.Core

Since: 10

Related module: OHAudio

Summary

Structs

Nametypedef KeywordDescription
OH_AudioStreamInfoOH_AudioStreamInfoDescribes the audio stream information, which is used to describe the basic audio format.
OH_AudioRenderer_Callbacks_StructOH_AudioRenderer_CallbacksDescribes a pointer to the callbacks related to an audio renderer. (It is deprecated in API version 20.)
OH_AudioCapturer_Callbacks_StructOH_AudioCapturer_CallbacksDescribes a pointer to the callbacks related to an audio capturer.
To avoid unexpected behavior, ensure that every member variable of the struct is initialized by a custom callback method or a null pointer when setting the audio callback functions. (It is deprecated in API version 20.)
OH_AudioStreamBuilderStructOH_AudioStreamBuilderDefines a struct for an audio stream builder. An audio stream builder instance is often used to create an audio stream and set its attributes.
OH_AudioRendererStructOH_AudioRendererDescribes an audio renderer, which is used to render audio data.
OH_AudioCapturerStructOH_AudioCapturerDescribes an audio capturer, which is used to capture audio data.

Enums

Nametypedef KeywordDescription
OH_AudioStream_ResultOH_AudioStream_ResultEnumerates the audio operation results.
OH_AudioStream_TypeOH_AudioStream_TypeEnumerates the audio stream types.
OH_AudioStream_SampleFormatOH_AudioStream_SampleFormatEnumerates the sampling formats of audio streams.
OH_AudioStream_EncodingTypeOH_AudioStream_EncodingTypeEnumerates the encoding types of audio streams.
OH_AudioStream_UsageOH_AudioStream_UsageEnumerates the usage scenarios of audio streams.
Generally, it is used to describe usage scenarios of audio output streams.
OH_AudioStream_LatencyModeOH_AudioStream_LatencyModeEnumerates the latency modes of audio streams.
OH_AudioStream_DirectPlaybackModeOH_AudioStream_DirectPlaybackModeEnumerates the direct playback modes of audio streams.
OH_AudioStream_VolumeModeOH_AudioStream_VolumeModeEnumerates the volume modes of audio streams.
OH_AudioStream_StateOH_AudioStream_StateEnumerates the audio stream states.
OH_AudioStream_SourceTypeOH_AudioStream_SourceTypeEnumerates the usage scenarios of audio streams.
Generally, it is used to describe usage scenarios of audio input streams.
OH_AudioStream_EventOH_AudioStream_EventEnumerates the audio stream events. (It is deprecated in API version 20.)
OH_AudioInterrupt_ForceTypeOH_AudioInterrupt_ForceTypeEnumerates the types of force that causes audio interruption.
The force type is obtained when an audio interruption event is received.
This type indicates whether the audio interruption operation is forcibly performed by the system. For details about the operation (such as audio pause and stop), see OH_AudioInterrupt_Hint.
OH_AudioInterrupt_HintOH_AudioInterrupt_HintEnumerates the hints provided along with audio interruption.
The force type is obtained when an audio interruption event is received.
The hint specifies the operation (such as audio pause or volume adjustment) to be performed on audio streams based on the focus strategy.
You can combine the OH_AudioInterrupt_ForceType information to determine whether the operation has been forcibly performed by the system.
OH_AudioInterrupt_ModeOH_AudioInterrupt_ModeEnumerates the audio interruption modes.
OH_AudioStream_AudioEffectModeOH_AudioStream_AudioEffectModeEnumerates the audio effect modes.
OH_AudioStream_FastStatusOH_AudioStream_FastStatusEnumerates the low-latency statuses.
OH_AudioStream_DeviceChangeReasonOH_AudioStream_DeviceChangeReasonEnumerates the reasons for audio stream device changes.
OH_AudioStream_PrivacyTypeOH_AudioStream_PrivacyTypeEnumerates the privacy types of an audio stream. The privacy type specifies whether the audio stream can be recorded by other applications.
OH_AudioData_Callback_ResultOH_AudioData_Callback_ResultEnumerates the audio data callback results.
OH_AudioStream_LatencyTypeOH_AudioStream_LatencyTypeEnumerates the audio latency types.
OH_AudioStream_PlaybackCaptureModeOH_AudioStream_PlaybackCaptureModeEnumerates the filter types for internal audio recording (capturing sound from the applications on the device). Each filter type corresponds to a type of playback stream. This API is currently not available for public use.
OH_AudioStream_PlaybackCaptureStartStateOH_AudioStream_PlaybackCaptureStartStateEnumerates the internal audio recording start statuses, which will be returned asynchronously after the OH_AudioCapturer_RequestPlaybackCaptureStart function is called. This API is currently not available for public use.

Functions

Nametypedef KeywordDescription
typedef void (*OH_AudioRenderer_OutputDeviceChangeCallback)(OH_AudioRenderer* renderer, void* userData, OH_AudioStream_DeviceChangeReason reason)OH_AudioRenderer_OutputDeviceChangeCallbackDefines a pointer to the callback invoked when the audio capturer device changes.
typedef void (*OH_AudioRenderer_OnMarkReachedCallback)(OH_AudioRenderer* renderer, uint32_t samplePos, void* userData)OH_AudioRenderer_OnMarkReachedCallbackDefines a pointer to the callback invoked when the mark position is reached.
typedef int32_t (*OH_AudioRenderer_WriteDataWithMetadataCallback)(OH_AudioRenderer* renderer, void* userData, void* audioData, int32_t audioDataSize, void* metadata, int32_t metadataSize)OH_AudioRenderer_WriteDataWithMetadataCallbackDefines a function pointer to the callback used to write audio data and metadata.
typedef OH_AudioData_Callback_Result (*OH_AudioRenderer_OnWriteDataCallback)(OH_AudioRenderer* renderer, void* userData, void* audioData, int32_t audioDataSize)OH_AudioRenderer_OnWriteDataCallbackDefines a function pointer to the callback used to write audio data.
The callback is used only to write audio data. Do not call AudioRenderer APIs in it.
The return result indicates whether the data filled in the buffer is valid. If the data is invalid, the data entered by the user will not be played.
Once the callback finishes its execution, the audio service queues the data pointed to by audioData for playback. Therefore, do not change the data outside the callback. It is crucial to fill audioData with the exact length (specified by audioDataSize) of data designated for playback; otherwise, noises may occur during playback.
The audioDataSize parameter can be set by calling OH_AudioStreamBuilder_SetFrameSizeInCallback.

Enum Description

OH_AudioStream_Result

enum OH_AudioStream_Result

Description

Enumerates the audio operation results.

Since: 10

Enum ItemDescription
AUDIOSTREAM_SUCCESS = 0Operation successful.
AUDIOSTREAM_ERROR_INVALID_PARAM = 1Invalid input parameter.
AUDIOSTREAM_ERROR_ILLEGAL_STATE = 2Invalid state.
AUDIOSTREAM_ERROR_SYSTEM = 3System error.
AUDIOSTREAM_ERROR_UNSUPPORTED_FORMAT = 4Unsupported audio format, such as unsupported encoding type or sampling format.
Since: 19

OH_AudioStream_Type

enum OH_AudioStream_Type

Description

Enumerates the audio stream types.

Since: 10

Enum ItemDescription
AUDIOSTREAM_TYPE_RENDERER = 1The audio stream is an output stream.
AUDIOSTREAM_TYPE_CAPTURER = 2The audio stream is an input stream.

OH_AudioStream_SampleFormat

enum OH_AudioStream_SampleFormat

Description

Enumerates the sampling formats of audio streams.

Since: 10

Enum ItemDescription
AUDIOSTREAM_SAMPLE_U8 = 0Unsigned 8-bit.
AUDIOSTREAM_SAMPLE_S16LE = 1Short 16-bit little-endian.
AUDIOSTREAM_SAMPLE_S24LE = 2Short 24-bit little-endian.
AUDIOSTREAM_SAMPLE_S32LE = 3Short 32-bit little-endian.
AUDIOSTREAM_SAMPLE_F32LE = 4Float 32-bit little-endian.
Since: 17

OH_AudioStream_EncodingType

enum OH_AudioStream_EncodingType

Description

Enumerates the encoding types of audio streams.

Since: 10

Enum ItemDescription
AUDIOSTREAM_ENCODING_TYPE_RAW = 0PCM encoding.
AUDIOSTREAM_ENCODING_TYPE_AUDIOVIVID = 1Audio Vivid encoding.
Since: 12
AUDIOSTREAM_ENCODING_TYPE_E_AC3 = 2E_AC3 encoding.
Since: 19

OH_AudioStream_Usage

enum OH_AudioStream_Usage

Description

Enumerates the usage scenarios of audio streams.
that is, usage scenarios of audio output streams.

Since: 10

Enum ItemDescription
AUDIOSTREAM_USAGE_UNKNOWN = 0Unknown content.
AUDIOSTREAM_USAGE_MUSIC = 1Music.
AUDIOSTREAM_USAGE_VOICE_COMMUNICATION = 2VoIP voice call.
AUDIOSTREAM_USAGE_VOICE_ASSISTANT = 3Voice assistant.
AUDIOSTREAM_USAGE_ALARM = 4Alarming.
AUDIOSTREAM_USAGE_VOICE_MESSAGE = 5Voice message.
AUDIOSTREAM_USAGE_RINGTONE = 6Ringtone.
AUDIOSTREAM_USAGE_NOTIFICATION = 7Notification.
AUDIOSTREAM_USAGE_ACCESSIBILITY = 8Accessibility.
AUDIOSTREAM_USAGE_MOVIE = 10Movie or video.
AUDIOSTREAM_USAGE_GAME = 11Gaming.
AUDIOSTREAM_USAGE_AUDIOBOOK = 12Audiobooks (including crosstalks and storytelling), news radio, and podcasts.
AUDIOSTREAM_USAGE_NAVIGATION = 13Navigation.
AUDIOSTREAM_USAGE_VIDEO_COMMUNICATION = 17VoIP video call.
Since: 12

OH_AudioStream_LatencyMode

enum OH_AudioStream_LatencyMode

Description

Enumerates the latency modes of audio streams.

Since: 10

Enum ItemDescription
AUDIOSTREAM_LATENCY_MODE_NORMAL = 0Normal latency mode.
AUDIOSTREAM_LATENCY_MODE_FAST = 1Low latency mode.

OH_AudioStream_DirectPlaybackMode

enum OH_AudioStream_DirectPlaybackMode

Description

Enumerates the direct playback modes of audio streams.

Since: 19

Enum ItemDescription
AUDIOSTREAM_DIRECT_PLAYBACK_NOT_SUPPORTED = 0Direct playback is not supported.
AUDIOSTREAM_DIRECT_PLAYBACK_BITSTREAM_SUPPORTED = 1Direct playback of bit streams (without decoding) is supported.
AUDIOSTREAM_DIRECT_PLAYBACK_PCM_SUPPORTED = 2Direct playback of PCM-encoded audio is supported.

OH_AudioStream_VolumeMode

enum OH_AudioStream_VolumeMode

Description

Enumerates the volume modes of audio streams.

Since: 19

Enum ItemDescription
AUDIOSTREAM_VOLUMEMODE_SYSTEM_GLOBAL = 0System-level volume (default mode).
AUDIOSTREAM_VOLUMEMODE_APP_INDIVIDUAL = 1Application-level volume.
In this mode, you can set and query the application volume through the provided functions.

OH_AudioStream_State

enum OH_AudioStream_State

Description

Enumerates the audio stream states.

Since: 10

Enum ItemDescription
AUDIOSTREAM_STATE_INVALID = -1Invalid state.
AUDIOSTREAM_STATE_NEW = 0Newly created.
AUDIOSTREAM_STATE_PREPARED = 1Prepared.
AUDIOSTREAM_STATE_RUNNING = 2Running.
AUDIOSTREAM_STATE_STOPPED = 3Stopped.
AUDIOSTREAM_STATE_RELEASED = 4Released.
AUDIOSTREAM_STATE_PAUSED = 5Paused.

OH_AudioStream_SourceType

enum OH_AudioStream_SourceType

Description

Enumerates the usage scenarios of audio streams,
that is, usage scenarios of audio input streams.

Since: 10

Enum ItemDescription
AUDIOSTREAM_SOURCE_TYPE_INVALID = -1Invalid state.
AUDIOSTREAM_SOURCE_TYPE_MIC = 0Audio recording.
AUDIOSTREAM_SOURCE_TYPE_VOICE_RECOGNITION = 1Voice recognition.
AUDIOSTREAM_SOURCE_TYPE_PLAYBACK_CAPTURE = 2Audio playback.
Deprecated from: 12
Substitute: OH_AVScreenCapture
AUDIOSTREAM_SOURCE_TYPE_VOICE_COMMUNICATION = 7Voice communication.
AUDIOSTREAM_SOURCE_TYPE_VOICE_MESSAGE = 10Voice message.
Since: 12
AUDIOSTREAM_SOURCE_TYPE_CAMCORDER = 13Video recording.
Since: 13
AUDIOSTREAM_SOURCE_TYPE_UNPROCESSED = 14Raw microphone recording, where the system does not perform any algorithm processing.
Since: 14
AUDIOSTREAM_SOURCE_TYPE_LIVE = 17Live.
Since: 20

OH_AudioStream_Event

enum OH_AudioStream_Event

Description

Enumerates the audio stream events.

Since: 10

Deprecated from: 20

Substitute: OH_AudioRenderer_OutputDeviceChangeCallback

Enum ItemDescription
AUDIOSTREAM_EVENT_ROUTING_CHANGED = 0The audio route has been changed.

OH_AudioInterrupt_ForceType

enum OH_AudioInterrupt_ForceType

Description

Enumerates the types of force that causes audio interruption.
The force type is obtained when an audio interruption event is received.
This type indicates whether the audio interruption operation is forcibly performed by the system. For details about the operation (such as audio pause and stop), see OH_AudioInterrupt_Hint.

Since: 10

Enum ItemDescription
AUDIOSTREAM_INTERRUPT_FORCE = 0The operation is forcibly performed by the system.
AUDIOSTREAM_INTERRUPT_SHARE = 1The system does not perform the specific operation. Instead, it notifies the application of the interruption through OH_AudioInterrupt_Hint and provides suggestions for the application to decide the next step.

OH_AudioInterrupt_Hint

enum OH_AudioInterrupt_Hint

Description

Enumerates the hints provided along with audio interruption.
The force type is obtained when an audio interruption event is received.
The hint specifies the operation (such as audio pause or volume adjustment) to be performed on audio streams based on the focus strategy.
You can combine the OH_AudioInterrupt_ForceType information to determine whether the operation has been forcibly performed by the system.

Since: 10

Enum ItemDescription
AUDIOSTREAM_INTERRUPT_HINT_NONE = 0None.
AUDIOSTREAM_INTERRUPT_HINT_RESUME = 1A hint is displayed, indicating that the audio stream is restored. The application can proactively trigger operations related to rendering or recording.
This operation cannot be forcibly performed by the system. The corresponding OH_AudioInterrupt_ForceType must be AUDIOSTREAM_INTERRUPT_SHARE.
AUDIOSTREAM_INTERRUPT_HINT_PAUSE = 2A hint is displayed, indicating that the audio stream is paused and the audio focus is lost temporarily.
The AUDIOSTREAM_INTERRUPT_HINT_RESUME event will be triggered when the focus is gained.
AUDIOSTREAM_INTERRUPT_HINT_STOP = 3A hint is displayed, indicating that the audio stream stops and the audio focus is lost.
AUDIOSTREAM_INTERRUPT_HINT_DUCK = 4A hint is displayed, indicating that audio ducking starts and the audio is played at a lower volume.
AUDIOSTREAM_INTERRUPT_HINT_UNDUCK = 5A hint is displayed, indicating that audio ducking ends and the audio is played at the normal volume.
AUDIOSTREAM_INTERRUPT_HINT_MUTE = 6A hint is displayed, indicating that the audio is muted.
Since: 20
AUDIOSTREAM_INTERRUPT_HINT_UNMUTE = 7A hint is displayed, indicating that the audio is unmuted.
Since: 20

OH_AudioInterrupt_Mode

enum OH_AudioInterrupt_Mode

Description

Enumerates the audio interruption modes.

Since: 12

Enum ItemDescription
AUDIOSTREAM_INTERRUPT_MODE_SHARE = 0Shared mode.
AUDIOSTREAM_INTERRUPT_MODE_INDEPENDENT = 1Independent mode.

OH_AudioStream_AudioEffectMode

enum OH_AudioStream_AudioEffectMode

Description

Enumerates the audio effect modes.

Since: 12

Enum ItemDescription
EFFECT_NONE = 0No audio effect used.
EFFECT_DEFAULT = 1Default audio effect mode.

OH_AudioStream_FastStatus

enum OH_AudioStream_FastStatus

Description

Enumerates the low-latency statuses.

Since: 20

Enum ItemDescription
AUDIOSTREAM_FASTSTATUS_NORMAL = 0Normal audio stream status.
AUDIOSTREAM_FASTSTATUS_FAST = 1Low-latency audio stream status.

OH_AudioStream_DeviceChangeReason

enum OH_AudioStream_DeviceChangeReason

Description

Enumerates the reasons for audio stream device changes.

Since: 11

Enum ItemDescription
REASON_UNKNOWN = 0Unknown reason.
REASON_NEW_DEVICE_AVAILABLE = 1A new device is available.
REASON_OLD_DEVICE_UNAVAILABLE = 2The old device is unavailable. When this reason is reported, the application should consider pausing audio playback.
REASON_OVERRODE = 3The user or system forcibly changes the device.
REASON_SESSION_ACTIVATED = 4The audio session has been activated.
Since: 20
REASON_STREAM_PRIORITY_CHANGED = 5An audio stream with higher priority appears.
Since: 20

OH_AudioStream_PrivacyType

enum OH_AudioStream_PrivacyType

Description

Enumerates the privacy types of an audio stream. The privacy type specifies whether the audio stream can be recorded by other applications.

Since: 12

Enum ItemDescription
AUDIO_STREAM_PRIVACY_TYPE_PUBLIC = 0The audio stream can be recorded or screen-projected by other applications and is not privacy-related.
AUDIO_STREAM_PRIVACY_TYPE_PRIVATE = 1The audio stream cannot be recorded or screen-projected by other applications.
AUDIO_STREAM_PRIVACY_TYPE_SHARED = 2The audio stream can be recorded or screen-projected by other applications and is privacy-related.
For example, if the privacy policy is PRIVACY_TYPE_PUBLIC, the AUDIOSTREAM_USAGE_VOICE_COMMUNICATION audio stream cannot be recorded or screen-projected by other applications. However, if the privacy policy is PRIVACY_TYPE_SHARED, these audio streams can be recorded or screen-projected by other applications.
Since: 21

OH_AudioData_Callback_Result

enum OH_AudioData_Callback_Result

Description

Enumerates the audio data callback results.

Since: 12

Enum ItemDescription
AUDIO_DATA_CALLBACK_RESULT_INVALID = -1The audio data callback result is invalid, and the audio data will not be played.
AUDIO_DATA_CALLBACK_RESULT_VALID = 0The audio data callback result is valid, and the audio data will be played.

OH_AudioStream_LatencyType

enum OH_AudioStream_LatencyType

Description

Enumerates the audio latency types.

Since: 23

Enum ItemDescription
AUDIOSTREAM_LATENCY_TYPE_ALL = 0Obtains the overall audio processing latency for both software and hardware components.
AUDIOSTREAM_LATENCY_TYPE_SOFTWARE = 1Obtains the software latency, including latency for sound effect processing on the software side.
AUDIOSTREAM_LATENCY_TYPE_HARDWARE = 2Obtains the hardware latency, including latency for sound effect processing on the hardware abstraction layer (HAL), driver, and hardware side.

OH_AudioStream_PlaybackCaptureMode

enum OH_AudioStream_PlaybackCaptureMode

Description

Enumerates the filter types for internal audio recording (capturing sound from the applications on the device). Each filter type corresponds to a type of playback stream. This API is currently not available for public use.

Since: 23

Enum ItemDescription
AUDIOSTREAM_PLAYBACKCAPTURE_MODE_DEFAULT = 0x0Default mode. Most audio streams are recorded, excluding the prompt streams and privacy streams.
Since: 23
AUDIOSTREAM_PLAYBACKCAPTURE_MODE_MEDIA = 0x1Media mode. Media, voice messages, and unknown streams are retrieved.
Since: 23
AUDIOSTREAM_PLAYBACKCAPTURE_MODE_EXCLUDING_SELF = 0x8000Self-exclusion mode. All audio streams except for those played by the application itself are retrieved.
Since: 23

OH_AudioStream_PlaybackCaptureStartState

enum OH_AudioStream_PlaybackCaptureStartState

Description

Enumerates the internal audio recording start statuses, which will be returned asynchronously after the OH_AudioCapturer_RequestPlaybackCaptureStart function is called. This API is currently not available for public use.

Since: 23

Enum ItemDescription
AUDIOSTREAM_PLAYBACKCAPTURE_START_STATE_SUCCESS = 0Internal audio recording is started successfully.
Since: 23
AUDIOSTREAM_PLAYBACKCAPTURE_START_STATE_FAILED = 1Internal audio recording fails to be started. The focus request (prioritized by stream type) is interrupted or an internal system error occurs.
Since: 23
AUDIOSTREAM_PLAYBACKCAPTURE_START_STATE_NOT_AUTHORIZED = 2Internal audio recording fails to be started due to lack of user authorization.
Since: 23

Function Description

OH_AudioRenderer_OutputDeviceChangeCallback()

typedef void (*OH_AudioRenderer_OutputDeviceChangeCallback)(OH_AudioRenderer* renderer, void* userData, OH_AudioStream_DeviceChangeReason reason)

Description

Defines a pointer to the callback invoked when the audio capturer device changes.

Since: 11

Parameters

NameDescription
OH_AudioRenderer* rendererPointer to an audio renderer instance, which is created by calling OH_AudioStreamBuilder_GenerateRenderer.
void* userDataPointer to the application data passed through the callback.
OH_AudioStream_DeviceChangeReason reasonEnumerates the reasons for audio stream device changes.

OH_AudioRenderer_OnMarkReachedCallback()

typedef void (*OH_AudioRenderer_OnMarkReachedCallback)(OH_AudioRenderer* renderer, uint32_t samplePos, void* userData)

Description

Defines a pointer to the callback invoked when the mark position is reached.

Since: 12

Parameters

NameDescription
OH_AudioRenderer* rendererPointer to an audio renderer instance, which is created by calling OH_AudioStreamBuilder_GenerateRenderer.
uint32_t samplePosMark position.
void* userDataPointer to the application data passed through the callback.

OH_AudioRenderer_WriteDataWithMetadataCallback()

typedef int32_t (*OH_AudioRenderer_WriteDataWithMetadataCallback)(OH_AudioRenderer* renderer, void* userData, void* audioData, int32_t audioDataSize, void* metadata, int32_t metadataSize)

Description

Defines a function pointer to the callback used to write audio data and metadata.

Since: 12

Parameters

NameDescription
OH_AudioRenderer* rendererPointer to an audio renderer instance, which is created by calling OH_AudioStreamBuilder_GenerateRenderer.
void* userDataPointer to the application data passed through the callback.
void* audioDataPointer to the audio data written by the user.
int32_t audioDataSizeLength of the audio data, in bytes.
void* metadataPointer to the metadata written by the user.
int32_t metadataSizeLength of the metadata, in bytes.

Returns

TypeDescription
int32_tError code of the callback.

OH_AudioRenderer_OnWriteDataCallback()

typedef OH_AudioData_Callback_Result (*OH_AudioRenderer_OnWriteDataCallback)(OH_AudioRenderer* renderer, void* userData, void* audioData, int32_t audioDataSize)

Description

Defines a function pointer to the callback used to write audio data.
The callback is used only to write audio data. Do not call AudioRenderer APIs in it.
The return result indicates whether the data filled in the buffer is valid. If the data is invalid, the data entered by the user will not be played.
Once the callback finishes its execution, the audio service queues the data pointed to by audioData for playback. Therefore, do not change the data outside the callback. It is crucial to fill audioData with the exact length (specified by audioDataSize) of data designated for playback; otherwise, noises may occur during playback.
The audioDataSize parameter can be set by calling OH_AudioStreamBuilder_SetFrameSizeInCallback.

Since: 12

Parameters

NameDescription
OH_AudioRenderer* rendererPointer to an audio renderer instance, which is created by calling OH_AudioStreamBuilder_GenerateRenderer.
void* userDataPointer to the application data passed through the callback.
void* audioDataPointer to the audio data written by the user.
int32_t audioDataSizeLength of the audio data, in bytes.

Returns

TypeDescription
OH_AudioData_Callback_ResultAUDIO_DATA_CALLBACK_RESULT_INVALID: The audio data callback result is invalid, and the audio data will not be played.
AUDIO_DATA_CALLBACK_RESULT_VALID: The audio data callback result is valid, and the audio data will be played.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-native-audiostreambuilder-h

openharmony 鸿蒙 capi-ohaudiosuite

openharmony 鸿蒙 js-apis-inner-multimedia-systemSoundPlayer

openharmony 鸿蒙 arkts-apis-audio-i

openharmony 鸿蒙 capi-ohaudio

openharmony 鸿蒙 capi-ohmidi

openharmony 鸿蒙 arkts-apis-audio-AudioManager

openharmony 鸿蒙 capi-ohaudiosuite-oh-audiosuite-spacerenderpositionparams

openharmony 鸿蒙 capi-ohaudio-oh-audiostreaminfo

openharmony 鸿蒙 errorcode-ringtone

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/BZl3JJXA