Crate ohos_audio_sys Copy item path Source OH_AudioCapturerStruct OH_AudioCapturer_Callbacks_Struct @brief Declaring the callback struct for capturer stream. OH_AudioDeviceDescriptor OH_AudioDeviceDescriptorArray @brief Declaring the audio device descriptor array. OH_AudioManager OH_AudioRendererStruct OH_AudioRenderer_Callbacks_Struct @brief Declaring the callback struct for renderer stream. OH_AudioResourceManager OH_AudioRoutingManager OH_AudioSessionManager OH_AudioSession_DeactivatedEvent @brief declare the audio session deactivated event OH_AudioSession_Strategy @brief declare the audio session strategy OH_AudioStreamBuilderStruct OH_AudioStreamManager OH_AudioVolumeManager OH_AudioWorkgroup OH_AmbAttributeSet_AMB_COM_ACN Ambisonic attribute: ACN Component Ordering OH_AmbAttributeSet_AMB_COM_FUMA Ambisonic attribute: FUMA Component Ordering OH_AmbAttributeSet_AMB_MODE Channel layout: Ambisonic mode OH_AmbAttributeSet_AMB_NOR_N3D Ambisonic attribute: N3D Normalization OH_AmbAttributeSet_AMB_NOR_SN3D Ambisonic attribute: SN3D Normalization OH_AmbAttributeSet_AMB_ORD_1 Ambisonic attribute: order 1 OH_AmbAttributeSet_AMB_ORD_2 Ambisonic attribute: order 2 OH_AmbAttributeSet_AMB_ORD_3 Ambisonic attribute: order 3 OH_AudioChannelLayout_CH_LAYOUT_2POINT0POINT2 Channel Layout For 2.0.2, 4 channels in total OH_AudioChannelLayout_CH_LAYOUT_2POINT1 Channel Layout For 2.1, 3 channels in total OH_AudioChannelLayout_CH_LAYOUT_2POINT1POINT2 Channel Layout For 2.1.2, 5 channels in total OH_AudioChannelLayout_CH_LAYOUT_3POINT0 Channel Layout For 3.0, 3 channels in total OH_AudioChannelLayout_CH_LAYOUT_3POINT0POINT2 Channel Layout For 3.0.2, 5 channels in total OH_AudioChannelLayout_CH_LAYOUT_3POINT1 Channel Layout For 3.1, 4 channels in total OH_AudioChannelLayout_CH_LAYOUT_3POINT1POINT2 Channel Layout For 3.1.2, 6 channels in total OH_AudioChannelLayout_CH_LAYOUT_4POINT0 Channel Layout For 4.0, 4 channels in total OH_AudioChannelLayout_CH_LAYOUT_4POINT1 Channel Layout For 4.1, 5 channels in total OH_AudioChannelLayout_CH_LAYOUT_5POINT0 Channel Layout For 5.0, 5 channels in total OH_AudioChannelLayout_CH_LAYOUT_5POINT0_BACK Channel Layout For 5.0-Back, 5 channels in total OH_AudioChannelLayout_CH_LAYOUT_5POINT1 Channel Layout For 5.1, 6 channels in total OH_AudioChannelLayout_CH_LAYOUT_5POINT1POINT2 Channel Layout For 5.1.2, 8 channels in total OH_AudioChannelLayout_CH_LAYOUT_5POINT1POINT4 Channel Layout For 5.1.4, 10 channels in total OH_AudioChannelLayout_CH_LAYOUT_5POINT1_BACK Channel Layout For 5.1-Back, 6 channels in total OH_AudioChannelLayout_CH_LAYOUT_6POINT0 Channel Layout For 6.0, 6 channels in total OH_AudioChannelLayout_CH_LAYOUT_6POINT0_FRONT Channel Layout For 6.0-Front, 6 channels in total OH_AudioChannelLayout_CH_LAYOUT_6POINT1 Channel Layout For 6.1, 7 channels in total OH_AudioChannelLayout_CH_LAYOUT_6POINT1_BACK Channel Layout For 6.1-Back, 7 channels in total OH_AudioChannelLayout_CH_LAYOUT_6POINT1_FRONT Channel Layout For 6.1-Front, 7 channels in total OH_AudioChannelLayout_CH_LAYOUT_7POINT0 Channel Layout For 7.0, 7 channels in total OH_AudioChannelLayout_CH_LAYOUT_7POINT0_FRONT Channel Layout For 7.0-Front, 7 channels in total OH_AudioChannelLayout_CH_LAYOUT_7POINT1 Channel Layout For 7.1, 8 channels in total OH_AudioChannelLayout_CH_LAYOUT_7POINT1POINT2 Channel Layout For 7.1.2, 10 channels in total OH_AudioChannelLayout_CH_LAYOUT_7POINT1POINT4 Channel Layout For 7.1.4, 12 channels in total OH_AudioChannelLayout_CH_LAYOUT_7POINT1_WIDE Channel Layout For 7.1-Wide, 8 channels in total OH_AudioChannelLayout_CH_LAYOUT_7POINT1_WIDE_BACK Channel Layout For 7.1-Wide-Back, 8 channels in total OH_AudioChannelLayout_CH_LAYOUT_9POINT1POINT4 Channel Layout For 9.1.4, 14 channels in total OH_AudioChannelLayout_CH_LAYOUT_9POINT1POINT6 Channel Layout For 9.1.6, 16 channels in total OH_AudioChannelLayout_CH_LAYOUT_10POINT2 Channel Layout For 10.2, 12 channels in total OH_AudioChannelLayout_CH_LAYOUT_22POINT2 Channel Layout For 22.2, 24 channels in total OH_AudioChannelLayout_CH_LAYOUT_AMB_ORDER1_ACN_N3D Channel Layout For ORDER1-ACN-N3D First Order Ambisonic(FOA), 4 channels in total OH_AudioChannelLayout_CH_LAYOUT_AMB_ORDER1_ACN_SN3D Channel Layout For ORDER1-ACN-SN3D FOA, 4 channels in total OH_AudioChannelLayout_CH_LAYOUT_AMB_ORDER1_FUMA Channel Layout For ORDER1-FUMA FOA, 4 channels in total OH_AudioChannelLayout_CH_LAYOUT_AMB_ORDER2_ACN_N3D Channel Layout For ORDER2-ACN-N3D Higher Order Ambisonics(HOA), 9 channels in total OH_AudioChannelLayout_CH_LAYOUT_AMB_ORDER2_ACN_SN3D Channel Layout For ORDER2-ACN-SN3D HOA, 9 channels in total OH_AudioChannelLayout_CH_LAYOUT_AMB_ORDER2_FUMA Channel Layout For ORDER2-FUMA HOA, 9 channels in total OH_AudioChannelLayout_CH_LAYOUT_AMB_ORDER3_ACN_N3D Channel Layout For ORDER3-ACN-N3D HOA, 16 channels in total OH_AudioChannelLayout_CH_LAYOUT_AMB_ORDER3_ACN_SN3D Channel Layout For ORDER3-ACN-SN3D HOA, 16 channels in total OH_AudioChannelLayout_CH_LAYOUT_AMB_ORDER3_FUMA Channel Layout For ORDER3-FUMA HOA, 16 channels in total OH_AudioChannelLayout_CH_LAYOUT_HEXADECAGONAL Channel Layout For Hexadecagonal, 16 channels in total OH_AudioChannelLayout_CH_LAYOUT_HEXAGONAL Channel Layout For Hexagonal, 6 channels in total OH_AudioChannelLayout_CH_LAYOUT_MONO Channel Layout For Mono, 1 channel in total OH_AudioChannelLayout_CH_LAYOUT_OCTAGONAL Channel Layout For Octagonal, 8 channels in total OH_AudioChannelLayout_CH_LAYOUT_QUAD Channel Layout For Quad, 4 channels in total OH_AudioChannelLayout_CH_LAYOUT_QUAD_SIDE Channel Layout For Quad-Side, 4 channels in total OH_AudioChannelLayout_CH_LAYOUT_STEREO Channel Layout For Stereo, 2 channels in total OH_AudioChannelLayout_CH_LAYOUT_STEREO_DOWNMIX Channel Layout For Stereo-Downmix, 2 channels in total OH_AudioChannelLayout_CH_LAYOUT_SURROUND Channel Layout For Surround, 3 channels in total OH_AudioChannelLayout_CH_LAYOUT_UNKNOWN Unknown Channel Layout OH_AudioChannelSet_CH_SET_BACK_CENTER Channel set For BACK_CENTER position OH_AudioChannelSet_CH_SET_BACK_LEFT Channel set For BACK_LEFT position OH_AudioChannelSet_CH_SET_BACK_RIGHT Channel set For BACK_RIGHT position OH_AudioChannelSet_CH_SET_BOTTOM_FRONT_CENTER Channel set For BOTTOM_FRONT_CENTER position OH_AudioChannelSet_CH_SET_BOTTOM_FRONT_LEFT Channel set For BOTTOM_FRONT_LEFT position OH_AudioChannelSet_CH_SET_BOTTOM_FRONT_RIGHT Channel set For BOTTOM_FRONT_RIGHT position OH_AudioChannelSet_CH_SET_FRONT_CENTER Channel set For FRONT_CENTER position OH_AudioChannelSet_CH_SET_FRONT_LEFT Channel set For FRONT-LEFT position OH_AudioChannelSet_CH_SET_FRONT_LEFT_OF_CENTER Channel set For FRONT_LEFT_OF_CENTER position OH_AudioChannelSet_CH_SET_FRONT_RIGHT Channel set For FRONT_RIGHT position OH_AudioChannelSet_CH_SET_FRONT_RIGHT_OF_CENTER Channel set For FRONT_RIGHT_OF_CENTER position OH_AudioChannelSet_CH_SET_LOW_FREQUENCY Channel set For LOW_FREQUENCY position OH_AudioChannelSet_CH_SET_LOW_FREQUENCY_2 Channel set For LOW_FREQUENCY_2 position OH_AudioChannelSet_CH_SET_SIDE_LEFT Channel set For SIDE_LEFT position OH_AudioChannelSet_CH_SET_SIDE_RIGHT Channel set For SIDE_RIGHT position OH_AudioChannelSet_CH_SET_STEREO_LEFT Channel set For STEREO_LEFT position OH_AudioChannelSet_CH_SET_STEREO_RIGHT Channel set For STEREO_RIGHT position OH_AudioChannelSet_CH_SET_SURROUND_DIRECT_LEFT Channel set For SURROUND_DIRECT_LEFT position OH_AudioChannelSet_CH_SET_SURROUND_DIRECT_RIGHT Channel set For SURROUND_DIRECT_RIGHT position OH_AudioChannelSet_CH_SET_TOP_BACK_CENTER Channel set For TOP_BACK_CENTER position OH_AudioChannelSet_CH_SET_TOP_BACK_LEFT Channel set For TOP_BACK_LEFT position OH_AudioChannelSet_CH_SET_TOP_BACK_RIGHT Channel set For TOP_BACK_RIGHT position OH_AudioChannelSet_CH_SET_TOP_CENTER Channel set For TOP_CENTER position OH_AudioChannelSet_CH_SET_TOP_FRONT_CENTER Channel set For TOP_FRONT_CENTER position OH_AudioChannelSet_CH_SET_TOP_FRONT_LEFT Channel set For TOP_FRONT_LEFT position OH_AudioChannelSet_CH_SET_TOP_FRONT_RIGHT Channel set For TOP_FRONT_RIGHT position OH_AudioChannelSet_CH_SET_TOP_SIDE_LEFT Channel set For TOP_SIDE_LEFT position OH_AudioChannelSet_CH_SET_TOP_SIDE_RIGHT Channel set For TOP_SIDE_RIGHT position OH_AudioChannelSet_CH_SET_WIDE_LEFT Channel set For WIDE_LEFT position OH_AudioChannelSet_CH_SET_WIDE_RIGHT Channel set For WIDE_RIGHT position OH_AudioCommon_Result_AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE @error Execution status exception. OH_AudioCommon_Result_AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM @error This means that the input parameter is invalid. OH_AudioCommon_Result_AUDIOCOMMON_RESULT_ERROR_NO_MEMORY @error This means there is no memory left. OH_AudioCommon_Result_AUDIOCOMMON_RESULT_ERROR_STREAM_LIMIT @error This means reached stream limit. OH_AudioCommon_Result_AUDIOCOMMON_RESULT_ERROR_SYSTEM @error An system error has occurred. OH_AudioCommon_Result_AUDIOCOMMON_RESULT_ERROR_TIMEOUT @error This means the operation is timeout. OH_AudioCommon_Result_AUDIOCOMMON_RESULT_ERROR_UNSUPPORTED @error This means the operation is unsupported. OH_AudioCommon_Result_AUDIOCOMMON_RESULT_SUCCESS @error The call was successful. OH_AudioData_Callback_Result_AUDIO_DATA_CALLBACK_RESULT_INVALID Result of audio data callabck is invalid. OH_AudioData_Callback_Result_AUDIO_DATA_CALLBACK_RESULT_VALID Result of audio data callabck is valid. OH_AudioDevice_ChangeType_AUDIO_DEVICE_CHANGE_TYPE_CONNECT @brief Device connection. OH_AudioDevice_ChangeType_AUDIO_DEVICE_CHANGE_TYPE_DISCONNECT @brief Device disconnection. OH_AudioDevice_Flag_AUDIO_DEVICE_FLAG_ALL @brief All device. OH_AudioDevice_Flag_AUDIO_DEVICE_FLAG_INPUT @brief Input device. OH_AudioDevice_Flag_AUDIO_DEVICE_FLAG_NONE @brief None device. OH_AudioDevice_Flag_AUDIO_DEVICE_FLAG_OUTPUT @brief Output device. OH_AudioDevice_Role_AUDIO_DEVICE_ROLE_INPUT @brief Input role. OH_AudioDevice_Role_AUDIO_DEVICE_ROLE_OUTPUT @brief Output role. OH_AudioDevice_Type_AUDIO_DEVICE_TYPE_BLUETOOTH_A2DP @brief Bluetooth device using advanced audio distibution profile (A2DP). OH_AudioDevice_Type_AUDIO_DEVICE_TYPE_BLUETOOTH_SCO @brief Bluetooth device using the synchronous connection oriented link (SCO). OH_AudioDevice_Type_AUDIO_DEVICE_TYPE_DEFAULT @brief Default device type. OH_AudioDevice_Type_AUDIO_DEVICE_TYPE_DISPLAY_PORT @brief Display port device. OH_AudioDevice_Type_AUDIO_DEVICE_TYPE_EARPIECE @brief Built-in earpiece. OH_AudioDevice_Type_AUDIO_DEVICE_TYPE_INVALID @brief Invalid device. OH_AudioDevice_Type_AUDIO_DEVICE_TYPE_MIC @brief Built-in microphone. OH_AudioDevice_Type_AUDIO_DEVICE_TYPE_REMOTE_CAST @brief Device type for rerouting audio to other remote devices by system application. OH_AudioDevice_Type_AUDIO_DEVICE_TYPE_SPEAKER @brief Built-in speaker. OH_AudioDevice_Type_AUDIO_DEVICE_TYPE_USB_HEADSET @brief USB audio headset. OH_AudioDevice_Type_AUDIO_DEVICE_TYPE_WIRED_HEADPHONES @brief A pair of wired headphones. OH_AudioDevice_Type_AUDIO_DEVICE_TYPE_WIRED_HEADSET @brief Wired headset, which is a combination of a pair of earpieces and a microphone. OH_AudioDevice_Usage_AUDIO_DEVICE_USAGE_CALL_ALL @brief Device used for call, including input and output. OH_AudioDevice_Usage_AUDIO_DEVICE_USAGE_CALL_INPUT @brief Device used for call input. OH_AudioDevice_Usage_AUDIO_DEVICE_USAGE_CALL_OUTPUT @brief Device used for call output. OH_AudioDevice_Usage_AUDIO_DEVICE_USAGE_MEDIA_ALL @brief Device used for media, including input and output. OH_AudioDevice_Usage_AUDIO_DEVICE_USAGE_MEDIA_INPUT @brief Device used for media input. OH_AudioDevice_Usage_AUDIO_DEVICE_USAGE_MEDIA_OUTPUT @brief Device used for media ouput. OH_AudioInterrupt_ForceType_AUDIOSTREAM_INTERRUPT_FORCE Force type, system change audio state. OH_AudioInterrupt_ForceType_AUDIOSTREAM_INTERRUPT_SHARE Share type, application change audio state. OH_AudioInterrupt_Hint_AUDIOSTREAM_INTERRUPT_HINT_DUCK Ducked the stream. OH_AudioInterrupt_Hint_AUDIOSTREAM_INTERRUPT_HINT_NONE None. OH_AudioInterrupt_Hint_AUDIOSTREAM_INTERRUPT_HINT_PAUSE Pause the stream. OH_AudioInterrupt_Hint_AUDIOSTREAM_INTERRUPT_HINT_RESUME Resume the stream. OH_AudioInterrupt_Hint_AUDIOSTREAM_INTERRUPT_HINT_STOP Stop the stream. OH_AudioInterrupt_Hint_AUDIOSTREAM_INTERRUPT_HINT_UNDUCK Unducked the stream. OH_AudioInterrupt_Mode_AUDIOSTREAM_INTERRUPT_MODE_INDEPENDENT Independent mode OH_AudioInterrupt_Mode_AUDIOSTREAM_INTERRUPT_MODE_SHARE Share mode OH_AudioScene_AUDIO_SCENE_DEFAULT Default audio scene. OH_AudioScene_AUDIO_SCENE_PHONE_CALL Phone call scene. OH_AudioScene_AUDIO_SCENE_RINGING Ringing scene. OH_AudioScene_AUDIO_SCENE_VOICE_CHAT Voice chat scene. OH_AudioSession_ConcurrencyMode_CONCURRENCY_DEFAULT @brief default mode OH_AudioSession_ConcurrencyMode_CONCURRENCY_DUCK_OTHERS @brief duck others mode OH_AudioSession_ConcurrencyMode_CONCURRENCY_MIX_WITH_OTHERS @brief mix with others mode OH_AudioSession_ConcurrencyMode_CONCURRENCY_PAUSE_OTHERS @brief pause others mode OH_AudioSession_DeactivatedReason_DEACTIVATED_LOWER_PRIORITY @brief deactivated because of lower priority OH_AudioSession_DeactivatedReason_DEACTIVATED_TIMEOUT @brief deactivated because of timing out OH_AudioStream_AudioEffectMode_EFFECT_DEFAULT Audio Effect Mode effect default. OH_AudioStream_AudioEffectMode_EFFECT_NONE Audio Effect Mode effect none. OH_AudioStream_DeviceChangeReason_REASON_NEW_DEVICE_AVAILABLE OH_AudioStream_DeviceChangeReason_REASON_OLD_DEVICE_UNAVAILABLE OH_AudioStream_DeviceChangeReason_REASON_OVERRODE OH_AudioStream_DeviceChangeReason_REASON_UNKNOWN OH_AudioStream_EncodingType_AUDIOSTREAM_ENCODING_TYPE_AUDIOVIVID AudioVivid encoding type. OH_AudioStream_EncodingType_AUDIOSTREAM_ENCODING_TYPE_RAW PCM encoding type. OH_AudioStream_Event_AUDIOSTREAM_EVENT_ROUTING_CHANGED The routing of the audio has changed. OH_AudioStream_LatencyMode_AUDIOSTREAM_LATENCY_MODE_FAST This is a low latency audio scene. OH_AudioStream_LatencyMode_AUDIOSTREAM_LATENCY_MODE_NORMAL This is a normal audio scene. OH_AudioStream_PrivacyType_AUDIO_STREAM_PRIVACY_TYPE_PRIVATE Privacy type that stream can not be captured.
@since 12 OH_AudioStream_PrivacyType_AUDIO_STREAM_PRIVACY_TYPE_PUBLIC Privacy type that stream can be captured by third party applications.
@since 12 OH_AudioStream_Result_AUDIOSTREAM_ERROR_ILLEGAL_STATE @error Execution status exception. OH_AudioStream_Result_AUDIOSTREAM_ERROR_INVALID_PARAM @error This means that the function was executed with an invalid input parameter. OH_AudioStream_Result_AUDIOSTREAM_ERROR_SYSTEM @error An system error has occurred. OH_AudioStream_Result_AUDIOSTREAM_SUCCESS @error The call was successful. OH_AudioStream_SampleFormat_AUDIOSTREAM_SAMPLE_S16LE Signed 16 bit integer, little endian. OH_AudioStream_SampleFormat_AUDIOSTREAM_SAMPLE_S24LE Signed 24 bit integer, little endian. OH_AudioStream_SampleFormat_AUDIOSTREAM_SAMPLE_S32LE Signed 32 bit integer, little endian. OH_AudioStream_SampleFormat_AUDIOSTREAM_SAMPLE_U8 Unsigned 8 format. OH_AudioStream_SourceType_AUDIOSTREAM_SOURCE_TYPE_INVALID Invalid type. OH_AudioStream_SourceType_AUDIOSTREAM_SOURCE_TYPE_MIC Mic source type. OH_AudioStream_SourceType_AUDIOSTREAM_SOURCE_TYPE_PLAYBACK_CAPTURE Playback capture source type. OH_AudioStream_SourceType_AUDIOSTREAM_SOURCE_TYPE_VOICE_COMMUNICATION Voice communication source type. OH_AudioStream_SourceType_AUDIOSTREAM_SOURCE_TYPE_VOICE_MESSAGE Voice message source type. OH_AudioStream_SourceType_AUDIOSTREAM_SOURCE_TYPE_VOICE_RECOGNITION Voice recognition source type. OH_AudioStream_State_AUDIOSTREAM_STATE_INVALID The invalid state. OH_AudioStream_State_AUDIOSTREAM_STATE_NEW Create new instance state. OH_AudioStream_State_AUDIOSTREAM_STATE_PAUSED The stream is paused. OH_AudioStream_State_AUDIOSTREAM_STATE_PREPARED The prepared state. OH_AudioStream_State_AUDIOSTREAM_STATE_RELEASED The stream is released. OH_AudioStream_State_AUDIOSTREAM_STATE_RUNNING The stream is running. OH_AudioStream_State_AUDIOSTREAM_STATE_STOPPED The stream is stopped. OH_AudioStream_Type_AUDIOSTREAM_TYPE_CAPTURER The type for audio stream is capturer. OH_AudioStream_Type_AUDIOSTREAM_TYPE_RENDERER The type for audio stream is renderer. OH_AudioStream_Usage_AUDIOSTREAM_USAGE_ACCESSIBILITY Accessibility usage, such as screen reader. OH_AudioStream_Usage_AUDIOSTREAM_USAGE_ALARM Alarm usage. OH_AudioStream_Usage_AUDIOSTREAM_USAGE_AUDIOBOOK Audiobook usage. OH_AudioStream_Usage_AUDIOSTREAM_USAGE_GAME Game sound effect usage. OH_AudioStream_Usage_AUDIOSTREAM_USAGE_MOVIE Movie or video usage. OH_AudioStream_Usage_AUDIOSTREAM_USAGE_MUSIC Music usage. OH_AudioStream_Usage_AUDIOSTREAM_USAGE_NAVIGATION Navigation usage. OH_AudioStream_Usage_AUDIOSTREAM_USAGE_NOTIFICATION Notification usage. OH_AudioStream_Usage_AUDIOSTREAM_USAGE_RINGTONE Ringtone usage. OH_AudioStream_Usage_AUDIOSTREAM_USAGE_UNKNOWN Unknown usage. OH_AudioStream_Usage_AUDIOSTREAM_USAGE_VIDEO_COMMUNICATION Video call usage. OH_AudioStream_Usage_AUDIOSTREAM_USAGE_VOICE_ASSISTANT Voice assistant usage. OH_AudioStream_Usage_AUDIOSTREAM_USAGE_VOICE_COMMUNICATION Voice communication usage. OH_AudioStream_Usage_AUDIOSTREAM_USAGE_VOICE_MESSAGE Voice message usage. OH_AudioCapturer_Flush ⚠ Request to flush the capturer stream. OH_AudioCapturer_GetCapturerInfo ⚠ Query the capturer info of the capturer client. OH_AudioCapturer_GetChannelCount ⚠ Query the channel count of the capturer client. OH_AudioCapturer_GetCurrentState ⚠ Query the current state of the capturer client. OH_AudioCapturer_GetEncodingType ⚠ Query the encoding type of the capturer client. OH_AudioCapturer_GetFrameSizeInCallback ⚠ Query the frame size in callback, it is a fixed length of the buffer returned by each callback. OH_AudioCapturer_GetFramesRead ⚠ Query the the number of frames that have been read since the stream was created. OH_AudioCapturer_GetLatencyMode ⚠ Query the latency mode of the capturer client. OH_AudioCapturer_GetOverflowCount ⚠ @brief Gets the overflow count on this stream. OH_AudioCapturer_GetSampleFormat ⚠ Query the sample format of the capturer client. OH_AudioCapturer_GetSamplingRate ⚠ Query the sample rate value of the capturer client. OH_AudioCapturer_GetStreamId ⚠ Query the stream id of the capturer client. OH_AudioCapturer_GetTimestamp ⚠ Query the the time at which a particular frame was presented OH_AudioCapturer_Pause ⚠ Request to pause the capturer stream. OH_AudioCapturer_Release ⚠ Request to release the capturer stream. OH_AudioCapturer_Start ⚠ Request to start the capturer stream. OH_AudioCapturer_Stop ⚠ Request to stop the capturer stream. OH_AudioDeviceDescriptor_GetDeviceAddress ⚠ @brief Query the device address of the target audio device descriptor. OH_AudioDeviceDescriptor_GetDeviceChannelCounts ⚠ @brief Query the device channel count array of the target audio device descriptor. OH_AudioDeviceDescriptor_GetDeviceDisplayName ⚠ @brief Query the display name of the target audio device descriptor. OH_AudioDeviceDescriptor_GetDeviceEncodingTypes ⚠ @brief Query the encoding type array of the target audio device descriptor. OH_AudioDeviceDescriptor_GetDeviceId ⚠ @brief Query the device id of the target audio device descriptor. OH_AudioDeviceDescriptor_GetDeviceName ⚠ @brief Query the device name of the target audio device descriptor. OH_AudioDeviceDescriptor_GetDeviceRole ⚠ @brief Query the device role of the target audio device descriptor. OH_AudioDeviceDescriptor_GetDeviceSampleRates ⚠ @brief Query the sample rate array of the target audio device descriptor. OH_AudioDeviceDescriptor_GetDeviceType ⚠ @brief Query the device type of the target audio device descriptor. OH_AudioManager_GetAudioRoutingManager ⚠ @brief Query the audio routing manager handle.
which should be set as the first parameter in routing releated functions. OH_AudioManager_GetAudioSessionManager ⚠ @brief Fetch the audio session manager handle.
The audio session manager handle should be the first parameter in audio session related functions OH_AudioRenderer_CancelMark ⚠ @brief Cancel mark which has set by {@link #OH_AudioRenderer_SetMarkPosition}. OH_AudioRenderer_Flush ⚠ Request to flush the renderer stream. OH_AudioRenderer_GetChannelCount ⚠ Query the channel count of the renderer client. OH_AudioRenderer_GetChannelLayout ⚠ @brief Query the channel layout of the renderer client. OH_AudioRenderer_GetCurrentState ⚠ Query the current state of the renderer client. OH_AudioRenderer_GetEffectMode ⚠ @brief Query current audio effect mode. OH_AudioRenderer_GetEncodingType ⚠ Query the encoding type of the renderer client. OH_AudioRenderer_GetFrameSizeInCallback ⚠ Query the frame size in callback, it is a fixed length that the stream want to be filled for each callback. OH_AudioRenderer_GetFramesWritten ⚠ Query the the number of frames that have been written since the stream was created. OH_AudioRenderer_GetLatencyMode ⚠ Query the latency mode of the renderer client. OH_AudioRenderer_GetRendererInfo ⚠ Query the renderer info of the renderer client. OH_AudioRenderer_GetRendererPrivacy ⚠ @brief Get the privacy of this stream. OH_AudioRenderer_GetSampleFormat ⚠ Query the sample format of the renderer client. OH_AudioRenderer_GetSamplingRate ⚠ Query the sample rate value of the renderer client OH_AudioRenderer_GetSilentModeAndMixWithOthers ⚠ @brief Query silent and mix with other streams status for this stream. OH_AudioRenderer_GetSpeed ⚠ Query the playback speed of the stream client OH_AudioRenderer_GetStreamId ⚠ Query the stream id of the renderer client. OH_AudioRenderer_GetTimestamp ⚠ Query the the time at which a particular frame was presented. OH_AudioRenderer_GetUnderflowCount ⚠ @brief Gets the underflow count on this stream. OH_AudioRenderer_GetVolume ⚠ Get Volume of current renderer. OH_AudioRenderer_Pause ⚠ Request to pause the renderer stream. OH_AudioRenderer_Release ⚠ Request to release the renderer stream. OH_AudioRenderer_SetDefaultOutputDevice ⚠ @brief Temporarily changes the current audio device
This function applys on audiorenderers whose StreamUsage are
STREAM_USAGE_VOICE_COMMUNICATIN/STREAM_USAGE_VIDEO_COMMUNICATION/STREAM_USAGE_VOICE_MESSAGE.
Setting the device will only takes effect if no other accessory such as headphones are in use. OH_AudioRenderer_SetEffectMode ⚠ @brief Set current audio effect mode. OH_AudioRenderer_SetMarkPosition ⚠ @brief Set mark position on current renderer. Calling this function will overwrite the mark postion which has already
set. OH_AudioRenderer_SetSilentModeAndMixWithOthers ⚠ @brief Set silent and mix with other streams for this stream. OH_AudioRenderer_SetSpeed ⚠ Set the playback speed of the stream client OH_AudioRenderer_SetVolume ⚠ Set volume of current renderer. OH_AudioRenderer_SetVolumeWithRamp ⚠ Changes the volume with ramp for a duration. OH_AudioRenderer_Start ⚠ Request to start the renderer stream. OH_AudioRenderer_Stop ⚠ Request to stop renderer stream. OH_AudioRoutingManager_GetAvailableDevices ⚠ @brief Get available devices by device usage. OH_AudioRoutingManager_GetDevices ⚠ @brief Query the available devices according to the input deviceFlag. OH_AudioRoutingManager_GetPreferredInputDevice ⚠ @brief Get preferred input devices by audio source type.
@param audioRoutingManager the {@link OH_AudioRoutingManager} handle returned
by {@link OH_AudioManager_GetAudioRoutingManager}.
@param sourceType the {@link OH_AudioStream_SourceType}.
@param audioDeviceDescriptorArray the {@link OH_AudioDeviceDescriptorArray}
pointer variable which will be set the audio device descriptors value
Do not release the audioDeviceDescriptorArray pointer separately
instead call {@link OH_AudioRoutingManager_ReleaseDevices} to release the DeviceDescriptor array
when it is no use anymore.
@return Function result code:
{@link AUDIOCOMMON_RESULT_SUCCESS} If the execution is successful.
{@link AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM}:
1.The param of audioRoutingManager is nullptr;
2.The param of sourceType is invalid;
3.The param of audioDeviceDescriptorArray is nullptr.
{@link AUDIOCOMMON_RESULT_ERROR_NO_MEMORY} No memory error.
@since 12 OH_AudioRoutingManager_GetPreferredOutputDevice ⚠ @brief Get preferred ouput devices by audio usage. OH_AudioRoutingManager_RegisterDeviceChangeCallback ⚠ @brief Register the device change callback of the audio routing manager. OH_AudioRoutingManager_ReleaseDevices ⚠ @brief Release the audio device descriptor array object. OH_AudioRoutingManager_UnregisterDeviceChangeCallback ⚠ @brief Unregister the device change callback of the audio routing manager. OH_AudioSessionManager_ActivateAudioSession ⚠ @brief Activate the audio session for the current pid application.
If {@link #OH_AudioSessionManager_SetScene} is called, it will take focus when calling this method. OH_AudioSessionManager_DeactivateAudioSession ⚠ @brief Deactivate the audio session for the current pid application. OH_AudioSessionManager_IsAudioSessionActivated ⚠ @brief Querying whether the current pid application has an activated audio session. OH_AudioSessionManager_RegisterSessionDeactivatedCallback ⚠ @brief Register the audio session deactivated event callback. OH_AudioSessionManager_UnregisterSessionDeactivatedCallback ⚠ @brief Unregister the audio session deactivated event callback. OH_AudioStreamBuilder_Create ⚠ Create a stremBuilder can be used to open a renderer or capturer client. OH_AudioStreamBuilder_Destroy ⚠ Destroy a streamBulder. OH_AudioStreamBuilder_GenerateCapturer ⚠ Create the audio capturer client. OH_AudioStreamBuilder_GenerateRenderer ⚠ Create the audio renderer client. OH_AudioStreamBuilder_SetCapturerCallback ⚠ Set the callbacks for the capturer client OH_AudioStreamBuilder_SetCapturerInfo ⚠ Set the capturer information of the stream client OH_AudioStreamBuilder_SetChannelCount ⚠ Set the channel count of the stream client OH_AudioStreamBuilder_SetChannelLayout ⚠ @brief Set the channel layout to the stream client OH_AudioStreamBuilder_SetEncodingType ⚠ Set the encoding type of the stream client OH_AudioStreamBuilder_SetFrameSizeInCallback ⚠ Set the data frame size for each callback, use this function if the application requires a specific number
of frames for processing.
The frame size should be at least the size device process at one time, and less than half the internal
buffer capacity. OH_AudioStreamBuilder_SetLatencyMode ⚠ Set the latency mode of the stream client OH_AudioStreamBuilder_SetRendererCallback ⚠ Set the callbacks for the renderer client OH_AudioStreamBuilder_SetRendererInfo ⚠ Set the renderer information of the stream client OH_AudioStreamBuilder_SetRendererInterruptMode ⚠ @brief Set the interrupt mode of the stream client OH_AudioStreamBuilder_SetRendererOutputDeviceChangeCallback ⚠ @brief Set the callback when the output device of an audio renderer changed. OH_AudioStreamBuilder_SetRendererPrivacy ⚠ @brief Set the privacy of audio render. OH_AudioStreamBuilder_SetRendererWriteDataCallback ⚠ @brief Set the callback of writing data to renderer client. OH_AudioStreamBuilder_SetSampleFormat ⚠ Set the sample format of the stream client OH_AudioStreamBuilder_SetSamplingRate ⚠ Set the channel count of the capturer client OH_AudioStreamBuilder_SetWriteDataWithMetadataCallback ⚠ @brief Set the callback of writing metadata to the renderer client OH_GetAudioManager ⚠ @brief Get audio manager handle. OH_GetAudioScene ⚠ @brief Get audio scene. OH_AmbAttributeSet @brief Ambisonic attribute set. OH_AudioCapturer @brief Declaring the audio capturer stream.
The instance of renderer stream is used for capturing audio data. OH_AudioCapturer_Callbacks @brief Declaring the callback struct for capturer stream. OH_AudioChannelLayout @brief Audio Channel Layout OH_AudioChannelSet @brief Audio Channel Set OH_AudioCommon_Result @brief Define the result of the function execution. OH_AudioData_Callback_Result @brief Defines enumeration of audio data callback result. OH_AudioDevice_ChangeType @brief Defines the audio device change type. OH_AudioDevice_Flag @brief Defines the audio device flag. OH_AudioDevice_Role @brief Defines the audio device device role. OH_AudioDevice_Type @brief Defines the audio device device type. OH_AudioDevice_Usage @brief Defines the audio device usage. OH_AudioInterrupt_ForceType @brief Defines the audio interrupt type. OH_AudioInterrupt_Hint @brief Defines the audio interrupt hint type. OH_AudioInterrupt_Mode @brief Defines the audio interrupt mode. OH_AudioRenderer @brief Declaring the audio renderer stream.
The instance of renderer stream is used for playing audio data. OH_AudioRenderer_Callbacks @brief Declaring the callback struct for renderer stream. OH_AudioRenderer_OnMarkReachedCallback @brief Callback when the mark position reached. OH_AudioRenderer_OnWriteDataCallback @brief Callback function of write data. OH_AudioRenderer_OutputDeviceChangeCallback @brief Callback when the output device of an audio renderer changed. OH_AudioRenderer_WriteDataWithMetadataCallback @brief This function pointer will point to the callback function that
is used to write audio data with metadata OH_AudioRoutingManager_OnDeviceChangedCallback @brief This function pointer will point to the callback function that
is used to return the changing audio device descriptors.
There may be more than one audio device descriptor returned. OH_AudioScene @brief Defines the audio scene. OH_AudioSession_ConcurrencyMode @brief Declare the audio concurrency modes. OH_AudioSession_DeactivatedCallback @brief This function pointer will point to the callback function that
is used to return the audio session deactivated event. OH_AudioSession_DeactivatedReason @brief Declare the audio deactivated reasons. OH_AudioStreamBuilder @brief Declaring the audio stream builder.
The instance of builder is used for creating audio stream. OH_AudioStream_AudioEffectMode @brief Defines the audio effect mode. OH_AudioStream_DeviceChangeReason @brief Defines reason for device changes of one audio stream. OH_AudioStream_EncodingType @brief Define the audio encoding type. OH_AudioStream_Event @brief Define the audio event. OH_AudioStream_LatencyMode @brief Define the audio latency mode. OH_AudioStream_PrivacyType @brief Defines Enumeration of audio stream privacy type for playback capture. OH_AudioStream_Result @brief Define the result of the function execution. OH_AudioStream_SampleFormat @brief Define the audio stream sample format. OH_AudioStream_SourceType @brief Defines the audio source type. OH_AudioStream_State @brief The audio stream states OH_AudioStream_Type @brief Define the audio stream type. OH_AudioStream_Usage @brief Define the audio stream usage.
Audio stream usage is used to describe what work scenario
the current stream is used for. clockid_t