diff --git a/multimedia/audio_framework/audio_capturer/native_audiocapturer.h b/multimedia/audio_framework/audio_capturer/native_audiocapturer.h index 249891cf9f8660a374a36155b8704d7e413ced5d..085870017656c5c9a234a1badef14b67cdb96c98 100644 --- a/multimedia/audio_framework/audio_capturer/native_audiocapturer.h +++ b/multimedia/audio_framework/audio_capturer/native_audiocapturer.h @@ -50,7 +50,10 @@ extern "C" { * @permission ohos.permission.MICROPHONE * * @param capturer reference created by OH_AudioStreamBuilder_GenerateCapturer() - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. */ OH_AudioStream_Result OH_AudioCapturer_Release(OH_AudioCapturer* capturer); @@ -61,7 +64,10 @@ OH_AudioStream_Result OH_AudioCapturer_Release(OH_AudioCapturer* capturer); * @permission ohos.permission.MICROPHONE * * @param capturer reference created by OH_AudioStreamBuilder_GenerateCapturer() - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. */ OH_AudioStream_Result OH_AudioCapturer_Start(OH_AudioCapturer* capturer); @@ -72,7 +78,10 @@ OH_AudioStream_Result OH_AudioCapturer_Start(OH_AudioCapturer* capturer); * @permission ohos.permission.MICROPHONE * * @param capturer reference created by OH_AudioStreamBuilder_GenerateCapturer() - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. */ OH_AudioStream_Result OH_AudioCapturer_Pause(OH_AudioCapturer* capturer); @@ -83,7 +92,10 @@ OH_AudioStream_Result OH_AudioCapturer_Pause(OH_AudioCapturer* capturer); * @permission ohos.permission.MICROPHONE * * @param capturer reference created by OH_AudioStreamBuilder_GenerateCapturer() - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. */ OH_AudioStream_Result OH_AudioCapturer_Stop(OH_AudioCapturer* capturer); @@ -93,7 +105,10 @@ OH_AudioStream_Result OH_AudioCapturer_Stop(OH_AudioCapturer* capturer); * @since 10 * * @param capturer reference created by OH_AudioStreamBuilder_GenerateCapturer() - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. */ OH_AudioStream_Result OH_AudioCapturer_Flush(OH_AudioCapturer* capturer); @@ -106,7 +121,9 @@ OH_AudioStream_Result OH_AudioCapturer_Flush(OH_AudioCapturer* capturer); * * @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer() * @param state Pointer to a variable that will be set for the state value. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. */ OH_AudioStream_Result OH_AudioCapturer_GetCurrentState(OH_AudioCapturer* capturer, OH_AudioStream_State* state); @@ -117,7 +134,9 @@ OH_AudioStream_Result OH_AudioCapturer_GetCurrentState(OH_AudioCapturer* capture * * @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer() * @param latencyMode Pointer to a variable that will be set for the latency mode. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. */ OH_AudioStream_Result OH_AudioCapturer_GetLatencyMode(OH_AudioCapturer* capturer, OH_AudioStream_LatencyMode* latencyMode); @@ -129,7 +148,9 @@ OH_AudioStream_Result OH_AudioCapturer_GetLatencyMode(OH_AudioCapturer* capturer * * @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer() * @param stramId Pointer to a variable that will be set for the stream id. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. */ OH_AudioStream_Result OH_AudioCapturer_GetStreamId(OH_AudioCapturer* capturer, uint32_t* streamId); @@ -142,7 +163,9 @@ OH_AudioStream_Result OH_AudioCapturer_GetStreamId(OH_AudioCapturer* capturer, u * * @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer() * @param rate The state value to be updated - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. */ OH_AudioStream_Result OH_AudioCapturer_GetSamplingRate(OH_AudioCapturer* capturer, int32_t* rate); @@ -153,7 +176,9 @@ OH_AudioStream_Result OH_AudioCapturer_GetSamplingRate(OH_AudioCapturer* capture * * @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer() * @param channelCount Pointer to a variable that will be set for the channel count. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. */ OH_AudioStream_Result OH_AudioCapturer_GetChannelCount(OH_AudioCapturer* capturer, int32_t* channelCount); @@ -164,7 +189,9 @@ OH_AudioStream_Result OH_AudioCapturer_GetChannelCount(OH_AudioCapturer* capture * * @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer() * @param sampleFormat Pointer to a variable that will be set for the sample format. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. */ OH_AudioStream_Result OH_AudioCapturer_GetSampleFormat(OH_AudioCapturer* capturer, OH_AudioStream_SampleFormat* sampleFormat); @@ -176,7 +203,9 @@ OH_AudioStream_Result OH_AudioCapturer_GetSampleFormat(OH_AudioCapturer* capture * * @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer() * @param encodingType Pointer to a variable that will be set for the encoding type. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. */ OH_AudioStream_Result OH_AudioCapturer_GetEncodingType(OH_AudioCapturer* capturer, OH_AudioStream_EncodingType* encodingType); @@ -188,7 +217,9 @@ OH_AudioStream_Result OH_AudioCapturer_GetEncodingType(OH_AudioCapturer* capture * * @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer() * @param sourceType Pointer to a variable that will be set for the stream sourceType. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. */ OH_AudioStream_Result OH_AudioCapturer_GetCapturerInfo(OH_AudioCapturer* capturer, OH_AudioStream_SourceType* sourceType); @@ -200,7 +231,10 @@ OH_AudioStream_Result OH_AudioCapturer_GetCapturerInfo(OH_AudioCapturer* capture * * @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer() * @param frameSize Pointer to a variable that will be set for the frame size. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. */ OH_AudioStream_Result OH_AudioCapturer_GetFrameSizeInCallback(OH_AudioCapturer* capturer, int32_t* frameSize); @@ -213,7 +247,12 @@ OH_AudioStream_Result OH_AudioCapturer_GetFrameSizeInCallback(OH_AudioCapturer* * @param clockId {@link #CLOCK_MONOTONIC} * @param framePosition Pointer to a variable to receive the position * @param timestamp Pointer to a variable to receive the timestamp - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of capturer is nullptr; + * 2.The param of clockId invalid. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. */ OH_AudioStream_Result OH_AudioCapturer_GetTimestamp(OH_AudioCapturer* capturer, clockid_t clockId, int64_t* framePosition, int64_t* timestamp); @@ -225,17 +264,22 @@ OH_AudioStream_Result OH_AudioCapturer_GetTimestamp(OH_AudioCapturer* capturer, * * @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer() * @param frames Pointer to a variable that will be set for the frame count number. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. */ OH_AudioStream_Result OH_AudioCapturer_GetFramesRead(OH_AudioCapturer* capturer, int64_t* frames); /** * @brief Gets the overflow count on this stream. * + * @since 12 + * * @param capturer Capturer generated by OH_AudioStreamBuilder_GenerateCapturer() * @param count Pointer to a variable that will be set for the overflow count number. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. - * @since 12 + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr. */ OH_AudioStream_Result OH_AudioCapturer_GetOverflowCount(OH_AudioCapturer* capturer, uint32_t* count); diff --git a/multimedia/audio_framework/audio_manager/native_audio_routing_manager.h b/multimedia/audio_framework/audio_manager/native_audio_routing_manager.h index 75acd956a00ce78b61cdb72ee4450c21131c1d9c..3ef572db1e60b1f81a0435956f532b1d5e3b69c2 100644 --- a/multimedia/audio_framework/audio_manager/native_audio_routing_manager.h +++ b/multimedia/audio_framework/audio_manager/native_audio_routing_manager.h @@ -80,7 +80,8 @@ typedef int32_t (*OH_AudioRoutingManager_OnDeviceChangedCallback) ( * * @param audioRoutingManager the {@link OH_AudioRoutingManager} * handle returned by {@link OH_AudioManager_GetAudioRoutingManager}. - * @return {@link #AUDIOCOMMON_RESULT_SUCCESS} + * @return Function result code: + * {@link AUDIOCOMMON_RESULT_SUCCESS} If the execution is successful. * @since 12 */ OH_AudioCommon_Result OH_AudioManager_GetAudioRoutingManager(OH_AudioRoutingManager **audioRoutingManager); @@ -97,8 +98,13 @@ OH_AudioCommon_Result OH_AudioManager_GetAudioRoutingManager(OH_AudioRoutingMana * 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 {@link #AUDIOCOMMON_RESULT_SUCCESS} or {@link #AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM} - * or {@link #AUDIOCOMMON_RESULT_ERROR_NO_MEMORY}. + * @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 deviceFlag invalid; + * 3.The param of audioDeviceDescriptorArray is nullptr. + * {@link AUDIOCOMMON_RESULT_ERROR_NO_MEMORY} The param of audioDeviceDescriptorArray is nullptr. * @since 12 */ OH_AudioCommon_Result OH_AudioRoutingManager_GetDevices( @@ -114,7 +120,12 @@ OH_AudioCommon_Result OH_AudioRoutingManager_GetDevices( * @param deviceFlag the {@link OH_AudioDevice_DeviceFlag} which is used to register callback. * @param callback the {@link OH_AudioRoutingManager_OnDeviceChangedCallback} * Callback function which will be called when devices changed. - * @return {@link #AUDIOCOMMON_RESULT_SUCCESS} or {@link #AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM}. + * @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 deviceFlag invalid; + * 3.The param of callback is nullptr. * @since 12 */ OH_AudioCommon_Result OH_AudioRoutingManager_RegisterDeviceChangeCallback( @@ -128,7 +139,11 @@ OH_AudioCommon_Result OH_AudioRoutingManager_RegisterDeviceChangeCallback( * handle returned by {@link OH_AudioManager_GetAudioRoutingManager}. * @param callback the {@link OH_AudioRoutingManager_OnDeviceChangedCallback} * Callback function which will be called when devices changed. - * @return {@link #AUDIOCOMMON_RESULT_SUCCESS} or {@link #AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM}. + * @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 callback is nullptr. * @since 12 */ OH_AudioCommon_Result OH_AudioRoutingManager_UnregisterDeviceChangeCallback( @@ -142,7 +157,11 @@ OH_AudioCommon_Result OH_AudioRoutingManager_UnregisterDeviceChangeCallback( * handle returned by {@link OH_AudioManager_GetAudioRoutingManager}. * @param audioDeviceDescriptorArray Audio device descriptors should be released. * and get from {@link OH_AudioRoutingManager_GetDevices} - * @return {@link #AUDIOCOMMON_RESULT_SUCCESS} or {@link #AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM}. + * @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 audioDeviceDescriptorArray is nullptr. * @since 12 */ OH_AudioCommon_Result OH_AudioRoutingManager_ReleaseDevices( diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index 89b86a734bbf6ad00b75ad1f2d4520dfb8c96573..c65846fad981efc826af543d684453539ebae52d 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -50,7 +50,10 @@ extern "C" { * @since 10 * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. */ OH_AudioStream_Result OH_AudioRenderer_Release(OH_AudioRenderer* renderer); @@ -60,7 +63,10 @@ OH_AudioStream_Result OH_AudioRenderer_Release(OH_AudioRenderer* renderer); * @since 10 * * @param renderer reference created by OH_AudioStreamBuilder - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. */ OH_AudioStream_Result OH_AudioRenderer_Start(OH_AudioRenderer* renderer); @@ -70,7 +76,10 @@ OH_AudioStream_Result OH_AudioRenderer_Start(OH_AudioRenderer* renderer); * @since 10 * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. */ OH_AudioStream_Result OH_AudioRenderer_Pause(OH_AudioRenderer* renderer); @@ -80,7 +89,10 @@ OH_AudioStream_Result OH_AudioRenderer_Pause(OH_AudioRenderer* renderer); * @since 10 * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. */ OH_AudioStream_Result OH_AudioRenderer_Stop(OH_AudioRenderer* renderer); @@ -90,7 +102,10 @@ OH_AudioStream_Result OH_AudioRenderer_Stop(OH_AudioRenderer* renderer); * @since 10 * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. */ OH_AudioStream_Result OH_AudioRenderer_Flush(OH_AudioRenderer* renderer); @@ -103,7 +118,9 @@ OH_AudioStream_Result OH_AudioRenderer_Flush(OH_AudioRenderer* renderer); * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param state Pointer to a variable that will be set for the state value. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_GetCurrentState(OH_AudioRenderer* renderer, OH_AudioStream_State* state); @@ -117,7 +134,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetCurrentState(OH_AudioRenderer* rendere * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param rate The state value to be updated - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_GetSamplingRate(OH_AudioRenderer* renderer, int32_t* rate); @@ -128,7 +147,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetSamplingRate(OH_AudioRenderer* rendere * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param stramId Pointer to a variable that will be set for the stream id. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_GetStreamId(OH_AudioRenderer* renderer, uint32_t* streamId); @@ -139,7 +160,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetStreamId(OH_AudioRenderer* renderer, u * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param channelCount Pointer to a variable that will be set for the channel count. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_GetChannelCount(OH_AudioRenderer* renderer, int32_t* channelCount); @@ -150,7 +173,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetChannelCount(OH_AudioRenderer* rendere * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param sampleFormat Pointer to a variable that will be set for the sample format. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_GetSampleFormat(OH_AudioRenderer* renderer, OH_AudioStream_SampleFormat* sampleFormat); @@ -162,7 +187,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetSampleFormat(OH_AudioRenderer* rendere * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param latencyMode Pointer to a variable that will be set for the latency mode. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_GetLatencyMode(OH_AudioRenderer* renderer, OH_AudioStream_LatencyMode* latencyMode); @@ -175,7 +202,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetLatencyMode(OH_AudioRenderer* renderer * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param usage Pointer to a variable that will be set for the stream usage. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_GetRendererInfo(OH_AudioRenderer* renderer, OH_AudioStream_Usage* usage); @@ -187,7 +216,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetRendererInfo(OH_AudioRenderer* rendere * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param encodingType Pointer to a variable that will be set for the encoding type. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_GetEncodingType(OH_AudioRenderer* renderer, OH_AudioStream_EncodingType* encodingType); @@ -199,7 +230,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetEncodingType(OH_AudioRenderer* rendere * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param frames Pointer to a variable that will be set for the frame count number. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_GetFramesWritten(OH_AudioRenderer* renderer, int64_t* frames); @@ -212,7 +245,12 @@ OH_AudioStream_Result OH_AudioRenderer_GetFramesWritten(OH_AudioRenderer* render * @param clockId {@link #CLOCK_MONOTONIC} * @param framePosition Pointer to a variable to receive the position * @param timestamp Pointer to a variable to receive the timestamp - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of renderer is nullptr; + * 2.The param of clockId invalid. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. */ OH_AudioStream_Result OH_AudioRenderer_GetTimestamp(OH_AudioRenderer* renderer, clockid_t clockId, int64_t* framePosition, int64_t* timestamp); @@ -224,61 +262,86 @@ OH_AudioStream_Result OH_AudioRenderer_GetTimestamp(OH_AudioRenderer* renderer, * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param frameSize Pointer to a variable that will be set for the frame size. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_GetFrameSizeInCallback(OH_AudioRenderer* renderer, int32_t* frameSize); /* -* Query the playback speed of the stream client -* -* @since 11 -* -* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() -* @param speed Pointer to a variable to receive the playback speed. -* @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. -*/ + * Query the playback speed of the stream client + * + * @since 11 + * + * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() + * @param speed Pointer to a variable to receive the playback speed. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. + */ OH_AudioStream_Result OH_AudioRenderer_GetSpeed(OH_AudioRenderer* renderer, float* speed); /* -* Set the playback speed of the stream client -* -* @since 11 -* -* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() -* @param speed The playback speed, form 0.25 to 4.0. -* @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. -*/ + * Set the playback speed of the stream client + * + * @since 11 + * + * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() + * @param speed The playback speed, form 0.25 to 4.0. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. + */ OH_AudioStream_Result OH_AudioRenderer_SetSpeed(OH_AudioRenderer* renderer, float speed); /** * Set volume of current renderer. * + * @since 12 + * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param volume Volume to set which changes from 0.0 to 1.0. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. - * @since 12 + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of renderer is nullptr; + * 2.The param of volume invalid. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. + * {@link AUDIOSTREAM_ERROR_SYSTEM} An system error has occurred. */ OH_AudioStream_Result OH_AudioRenderer_SetVolume(OH_AudioRenderer* renderer, float volume); /** * Changes the volume with ramp for a duration. * + * @since 12 + * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param volume Volume to set which changes from 0.0 to 1.0. * @param durationMs Duration for volume ramp, in millisecond. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. - * @since 12 + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of renderer is nullptr; + * 2.The param of volume invalid. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. + * {@link AUDIOSTREAM_ERROR_SYSTEM} An system error has occurred. */ OH_AudioStream_Result OH_AudioRenderer_SetVolumeWithRamp(OH_AudioRenderer* renderer, float volume, int32_t durationMs); /** * Get Volume of current renderer. * + * @since 12 + * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param volume Pointer to a variable to receive the volume. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. - * @since 12 + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of renderer is nullptr; + * 2.The param of volume is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_GetVolume(OH_AudioRenderer* renderer, float* volume); @@ -286,12 +349,19 @@ OH_AudioStream_Result OH_AudioRenderer_GetVolume(OH_AudioRenderer* renderer, flo * @brief Set mark position on current renderer. Calling this function will overwrite the mark postion which has already * set. * + * @since 12 + * * @param renderer Renderer generated by OH_AudioStreamBuilder_GenerateRenderer() * @param samplePos Mark position in samples. * @param callback Callback used when the samplePos has reached. * @param userData User data which is passed by user. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. - * @since 12 + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of renderer is nullptr; + * 2.The param of samplePos invalid. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. + * {@link AUDIOSTREAM_ERROR_SYSTEM} An system error has occurred. */ OH_AudioStream_Result OH_AudioRenderer_SetMarkPosition(OH_AudioRenderer* renderer, uint32_t samplePos, OH_AudioRenderer_OnMarkReachedCallback callback, void* userData); @@ -299,19 +369,27 @@ OH_AudioStream_Result OH_AudioRenderer_SetMarkPosition(OH_AudioRenderer* rendere /** * @brief Cancel mark which has set by {@link #OH_AudioRenderer_SetMarkPosition}. * - * @param renderer Renderer generated by OH_AudioStreamBuilder_GenerateRenderer() - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. * @since 12 + * + * @param renderer Renderer generated by OH_AudioStreamBuilder_GenerateRenderer() + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_CancelMark(OH_AudioRenderer* renderer); /** * @brief Gets the underflow count on this stream. * + * @since 12 + * * @param renderer Renderer generated by OH_AudioStreamBuilder_GenerateRenderer() * @param count Pointer to a variable to receive the underflow count number. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. - * @since 12 + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of renderer is nullptr; + * 2.The param of count is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_GetUnderflowCount(OH_AudioRenderer* renderer, uint32_t* count); @@ -322,7 +400,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetUnderflowCount(OH_AudioRenderer* rende * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param channelLayout Pointer to a variable to receive the channel layout - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_GetChannelLayout(OH_AudioRenderer* renderer, OH_AudioChannelLayout* channelLayout); @@ -334,7 +414,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetChannelLayout(OH_AudioRenderer* render * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param effectMode Pointer to a variable to receive current audio effect mode - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_GetEffectMode(OH_AudioRenderer* renderer, OH_AudioStream_AudioEffectMode* effectMode); @@ -346,7 +428,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetEffectMode(OH_AudioRenderer* renderer, * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param effectMode Audio effect mode that will be set for the stream - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_SetEffectMode(OH_AudioRenderer* renderer, OH_AudioStream_AudioEffectMode effectMode); @@ -354,10 +438,13 @@ OH_AudioStream_Result OH_AudioRenderer_SetEffectMode(OH_AudioRenderer* renderer, /** * @brief Get the privacy of this stream. * + * @since 12 + * * @param renderer Renderer generated by OH_AudioStreamBuilder_GenerateRenderer() * @param privacy Pointer to a variable which receives the results. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. - * @since 12 + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr. */ OH_AudioStream_Result OH_AudioRenderer_GetRendererPrivacy(OH_AudioRenderer* renderer, OH_AudioStream_PrivacyType* privacy); diff --git a/multimedia/audio_framework/common/native_audiostreambuilder.h b/multimedia/audio_framework/common/native_audiostreambuilder.h index 0fdb40557d9b25e222b4ccc5b4a23b2a07ca6f38..cc62318f02ee1f7f9ac94a26f69d6e0535ca76e9 100644 --- a/multimedia/audio_framework/common/native_audiostreambuilder.h +++ b/multimedia/audio_framework/common/native_audiostreambuilder.h @@ -53,7 +53,8 @@ extern "C" { * * @param builder The builder reference to the created result. * @param type The stream type to be created. {@link #AUDIOSTREAM_TYPE_RENDERER} or {@link #AUDIOSTREAM_TYPE_CAPTURER} - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. */ OH_AudioStream_Result OH_AudioStreamBuilder_Create(OH_AudioStreamBuilder** builder, OH_AudioStream_Type type); @@ -65,7 +66,10 @@ OH_AudioStream_Result OH_AudioStreamBuilder_Create(OH_AudioStreamBuilder** build * @since 10 * * @param builder Reference provided by OH_AudioStreamBuilder_Create() - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of builder is nullptr. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception. */ OH_AudioStream_Result OH_AudioStreamBuilder_Destroy(OH_AudioStreamBuilder* builder); @@ -76,7 +80,11 @@ OH_AudioStream_Result OH_AudioStreamBuilder_Destroy(OH_AudioStreamBuilder* build * * @param capturer Reference created by OH_AudioStreamBuilder * @param channelCount Pointer to a variable that will be set for the channel count. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of builder is nullptr; + * 2.The param of rate invalid. */ OH_AudioStream_Result OH_AudioStreamBuilder_SetSamplingRate(OH_AudioStreamBuilder* builder, int32_t rate); @@ -87,7 +95,11 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetSamplingRate(OH_AudioStreamBuilde * * @param builder Reference provided by OH_AudioStreamBuilder_Create() * @param channelCount The channel count. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of builder is nullptr; + * 2.The param of channelCount invalid. */ OH_AudioStream_Result OH_AudioStreamBuilder_SetChannelCount(OH_AudioStreamBuilder* builder, int32_t channelCount); @@ -98,7 +110,9 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetChannelCount(OH_AudioStreamBuilde * * @param builder Reference provided by OH_AudioStreamBuilder_Create() * @param format Sample data format. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of builder is nullptr. */ OH_AudioStream_Result OH_AudioStreamBuilder_SetSampleFormat(OH_AudioStreamBuilder* builder, OH_AudioStream_SampleFormat format); @@ -110,7 +124,9 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetSampleFormat(OH_AudioStreamBuilde * * @param builder Reference provided by OH_AudioStreamBuilder_Create() * @param encodingType Encoding type for the stream client, {@link #AUDIOSTREAM_ENCODING_PCM} - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of builder is nullptr. */ OH_AudioStream_Result OH_AudioStreamBuilder_SetEncodingType(OH_AudioStreamBuilder* builder, OH_AudioStream_EncodingType encodingType); @@ -122,7 +138,9 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetEncodingType(OH_AudioStreamBuilde * * @param builder Reference provided by OH_AudioStreamBuilder_Create() * @param latencyMode Latency mode for the stream client. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of builder is nullptr. */ OH_AudioStream_Result OH_AudioStreamBuilder_SetLatencyMode(OH_AudioStreamBuilder* builder, OH_AudioStream_LatencyMode latencyMode); @@ -134,7 +152,9 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetLatencyMode(OH_AudioStreamBuilder * * @param builder Reference provided by OH_AudioStreamBuilder_Create() * @param channelLayout is the layout of the speaker. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of builder is nullptr. */ OH_AudioStream_Result OH_AudioStreamBuilder_SetChannelLayout(OH_AudioStreamBuilder* builder, OH_AudioChannelLayout channelLayout); @@ -146,7 +166,11 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetChannelLayout(OH_AudioStreamBuild * * @param builder Reference provided by OH_AudioStreamBuilder_Create() * @param usage Set the stream usage for the renderer client. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of builder is nullptr; + * 2.The param of usage invalid. */ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererInfo(OH_AudioStreamBuilder* builder, OH_AudioStream_Usage usage); @@ -158,7 +182,11 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererInfo(OH_AudioStreamBuilde * * @param builder Reference provided by OH_AudioStreamBuilder_Create() * @param sourceType Set the source type for the capturer client. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of builder is nullptr; + * 2.The param of sourceType invalid. */ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerInfo(OH_AudioStreamBuilder* builder, OH_AudioStream_SourceType sourceType); @@ -171,7 +199,11 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerInfo(OH_AudioStreamBuilde * @param builder Reference provided by OH_AudioStreamBuilder_Create() * @param callbacks Callbacks to the functions that will process renderer stream. * @param userData Pointer to an application data structure that will be passed to the callback functions. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of builder is nullptr; + * 2.StreamType invalid. */ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererCallback(OH_AudioStreamBuilder* builder, OH_AudioRenderer_Callbacks callbacks, void* userData); @@ -179,11 +211,16 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererCallback(OH_AudioStreamBu /** * @brief Set the callback when the output device of an audio renderer changed. * + * @since 11 + * * @param builder Reference provided by OH_AudioStreamBuilder_Create() * @param callback Callback to the function that will process this device change event. * @param userData Pointer to an application data structure that will be passed to the callback functions. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. - * @since 11 + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of builder is nullptr; + * 2.StreamType invalid. */ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererOutputDeviceChangeCallback(OH_AudioStreamBuilder* builder, OH_AudioRenderer_OutputDeviceChangeCallback callback, void* userData); @@ -191,10 +228,15 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererOutputDeviceChangeCallbac /** * @brief Set the privacy of audio render. * + * @since 12 + * * @param builder Builder provided by OH_AudioStreamBuilder_Create() * @param privacy Privacy type. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. - * @since 12 + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of builder is nullptr; + * 2.StreamType invalid. */ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererPrivacy(OH_AudioStreamBuilder* builder, OH_AudioStream_PrivacyType privacy); @@ -207,7 +249,11 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererPrivacy(OH_AudioStreamBui * @param builder Reference provided by OH_AudioStreamBuilder_Create() * @param callbacks Callbacks to the functions that will process capturer stream. * @param userData Pointer to an application data structure that will be passed to the callback functions. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of builder is nullptr; + * 2.StreamType invalid. */ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerCallback(OH_AudioStreamBuilder* builder, OH_AudioCapturer_Callbacks callbacks, void* userData); @@ -219,10 +265,16 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerCallback(OH_AudioStreamBu * * @param builder Reference provided by OH_AudioStreamBuilder_Create() * @param audioRenderer Pointer to a viriable to receive the stream client. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of builder is nullptr; + * 2.StreamType invalid; + * 3.Create OHAudioRenderer failed. */ OH_AudioStream_Result OH_AudioStreamBuilder_GenerateRenderer(OH_AudioStreamBuilder* builder, OH_AudioRenderer** audioRenderer); + /* * Create the audio capturer client. * @@ -230,7 +282,12 @@ OH_AudioStream_Result OH_AudioStreamBuilder_GenerateRenderer(OH_AudioStreamBuild * * @param builder Reference provided by OH_AudioStreamBuilder_Create() * @param audioCapturer Pointer to a viriable to receive the stream client. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of builder is nullptr; + * 2.StreamType invalid; + * 3.Create OHAudioRenderer failed. */ OH_AudioStream_Result OH_AudioStreamBuilder_GenerateCapturer(OH_AudioStreamBuilder* builder, OH_AudioCapturer** audioCapturer); @@ -245,7 +302,9 @@ OH_AudioStream_Result OH_AudioStreamBuilder_GenerateCapturer(OH_AudioStreamBuild * * @param builder Reference provided by OH_AudioStreamBuilder_Create() * @param frameSize The data frame size for each callback. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of builder is nullptr. */ OH_AudioStream_Result OH_AudioStreamBuilder_SetFrameSizeInCallback(OH_AudioStreamBuilder* builder, int32_t frameSize); @@ -258,7 +317,11 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetFrameSizeInCallback(OH_AudioStrea * @param builder Reference provided by OH_AudioStreamBuilder_Create() * @param callback Callback to the functions that will write audio data with metadata to the renderer. * @param userData Pointer to an application data structure that will be passed to the callback functions. - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of builder is nullptr; + * 2.StreamType invalid. */ OH_AudioStream_Result OH_AudioStreamBuilder_SetWriteDataWithMetadataCallback(OH_AudioStreamBuilder* builder, OH_AudioRenderer_WriteDataWithMetadataCallback callback, void* userData); @@ -266,10 +329,16 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetWriteDataWithMetadataCallback(OH_ /** * @brief Set the interrupt mode of the stream client * + * @since 12 + * * @param builder Reference provided by OH_AudioStreamBuilder_Create() * @param mode The audio interrupt mode - * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. - * @since 12 + * @return Function result code: + * {@link AUDIOSTREAM_SUCCESS} If the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}: + * 1.The param of builder is nullptr; + * 2.The param of mode invalid; + * 3.StreamType invalid. */ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererInterruptMode(OH_AudioStreamBuilder* builder, OH_AudioInterrupt_Mode mode);