From ca3d4065951772fbfe0815ab4f8a19f44277a9a1 Mon Sep 17 00:00:00 2001 From: Jaechul Lee Date: Wed, 25 Sep 2024 10:05:36 +0900 Subject: [PATCH] Add doxygen for internal APIs [Version] 0.5.70 [Issue Type] Doxygen Change-Id: I416de2a52f7c925dcd5e563cfcfb1f8858cc063c Signed-off-by: Jaechul Lee --- include/audio_io_internal.h | 237 ++++++++++++++++++++++++++++++++++++- packaging/capi-media-audio-io.spec | 2 +- 2 files changed, 236 insertions(+), 3 deletions(-) diff --git a/include/audio_io_internal.h b/include/audio_io_internal.h index 3dccb0e..017f204 100644 --- a/include/audio_io_internal.h +++ b/include/audio_io_internal.h @@ -21,43 +21,276 @@ extern "C" { #endif +/** + * @file audio_io_internal.h + * @brief This file contains audio-io internal APIs + */ + +/** + * @addtogroup CAPI_MEDIA_AUDIO_IN_INTERNAL_MODULE + * @{ + */ + +/** + * @internal + * @brief Enumeration for audio effect + * @since_tizen 9.0 + */ typedef enum { AUDIO_IO_EFFECT_METHOD_ACOUSTIC_ECHO_CANCELLATION = 0x1, AUDIO_IO_EFFECT_METHOD_NOISE_SUPPRESSION = 0x2, AUDIO_IO_EFFECT_METHOD_AUTO_GAIN_CONTROL = 0x4, } audio_io_effect_method_e; +/** + * @internal + * @brief audio effect method handle; + * @since_tizen 9.0 + */ typedef struct audio_io_effect_method_s *audio_io_effect_method_h; + +/** + * @internal + * @brief audio effect method chain handle + * @since_tizen 9.0 + */ typedef struct audio_io_effect_method_chain_s *audio_io_effect_method_chain_h; + +/** + * @internal + * @brief audio effect method chain builder handle + * @since_tizen 9.0 + */ typedef struct audio_io_effect_method_chain_builder_s *audio_io_effect_method_chain_builder_h; +/** + * @internal + * @brief Creates an acoustic echo canceller effect method. + * @since_tizen 9.0 + * + * @param[in] rate The sample rate for the audio processing + * @param[in] channels The number of audio channels to use + * @param[in] sample_type The audio sample type to be used + * @param[in] framesize The size of the audio frames + * @param[out] audio_io_effect The handle to the created effect method + * @param[out] adjust_framesize The adjusted frame size for the effect + * @return @c 0 on success, + * otherwise a negative error value + * @retval #AUDIO_IO_ERROR_NONE Successful + * @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation + */ int audio_io_create_acoustic_echo_canceller(int rate, audio_channel_e channels, audio_sample_type_e sample_type, size_t framesize, audio_io_effect_method_h *audio_io_effect, size_t *adjust_framesize); + +/** + * @internal + * @brief Creates a noise suppressor effect method. + * @since_tizen 9.0 + * + * @param[in] rate The sample rate for the audio processing + * @param[in] channels The number of audio channels to use + * @param[in] sample_type The audio sample type to be used + * @param[in] framesize The size of the audio frames + * @param[out] audio_io_effect The handle to the created effect method + * @param[out] adjust_framesize The adjusted frame size for the effect + * @return @c 0 on success, + * otherwise a negative error value + * @retval #AUDIO_IO_ERROR_NONE Successful + * @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation + */ int audio_io_create_noise_suppressor(int rate, audio_channel_e channels, audio_sample_type_e sample_type, size_t framesize, audio_io_effect_method_h *audio_io_effect, size_t *adjust_framesize); + +/** + * @internal + * @brief Creates an auto gain control effect method. + * @since_tizen 9.0 + * + * @param[in] rate The sample rate for the audio processing + * @param[in] channels The number of audio channels to use + * @param[in] sample_type The audio sample type to be used + * @param[in] framesize The size of the audio frames + * @param[out] audio_io_effect The handle to the created effect method * @param[out] adjust_framesize The adjusted frame size for the effect + * @return @c 0 on success, + * otherwise a negative error value + * @retval #AUDIO_IO_ERROR_NONE Successful + * @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation + */ int audio_io_create_auto_gain_control(int rate, audio_channel_e channels, audio_sample_type_e sample_type, size_t framesize, audio_io_effect_method_h *audio_io_effect, size_t *adjust_framesize); + +/** + * @internal + * @brief Destroys an effect method. + * @since_tizen 9.0 + * + * @param[in] audio_io_effect The handle to the effect method to be destroyed + * @return @c 0 on success, + * otherwise a negative error value + * @retval #AUDIO_IO_ERROR_NONE Successful + * @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation + * @see audio_io_create_acoustic_echo_canceller() + * @see audio_io_create_noise_suppressor() + * @see audio_io_create_auto_gain_control() + */ int audio_io_destroy_effect_method(audio_io_effect_method_h audio_io_effect); +/** + * @internal + * @brief Applies the effect method to the input audio data. + * @since_tizen 9.0 + * + * @param[in] audio_io_effect The handle to the effect method to apply + * @param[in] in Input audio data buffer + * @param[out] out Output audio data buffer (processed) + * @return @c 0 on success, + * otherwise a negative error value + * @retval #AUDIO_IO_ERROR_NONE Successful + * @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation + * @see audio_io_create_acoustic_echo_canceller() + * @see audio_io_create_noise_suppressor() + * @see audio_io_create_auto_gain_control() + */ int audio_io_apply_effect_method(audio_io_effect_method_h audio_io_effect, const char *in, char *out); + +/** + * @internal + * @brief Applies the effect method to the input audio data with an additional reference. + * @since_tizen 9.0 + * + * @param[in] audio_io_effect The handle to the effect method to apply + * @param[in] in Input audio data buffer + * @param[in] ref Reference audio data buffer + * @param[out] out Output audio data buffer (processed) + * @return @c 0 on success, + * otherwise a negative error value + * @retval #AUDIO_IO_ERROR_NONE Successful + * @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation + * @see audio_io_create_acoustic_echo_canceller() + * @see audio_io_create_noise_suppressor() + * @see audio_io_create_auto_gain_control() + */ int audio_io_apply_effect_method_with_reference(audio_io_effect_method_h audio_io_effect, const char *in, const char *ref, char *out); -/* effect chain */ +/** + * @internal + * @brief Creates a builder for an effect method chain. + * @since_tizen 9.0 + * + * @param[in] rate The sample rate for the audio processing + * @param[in] channels The number of audio channels to use + * @param[in] sample_type The audio sample type to be used + * @param[in] request_framesize The requested size of frames + * @param[out] builder The handle to the created effect method chain builder + * @return @c 0 on success, + * otherwise a negative error value + * @retval #AUDIO_IO_ERROR_NONE Successful + * @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #AUDIO_IO_ERROR_OUT_OF_MEMORY Out of memory + */ int audio_io_create_effect_method_chain_builder(int rate, audio_channel_e channels, audio_sample_type_e sample_type, size_t request_framesize, audio_io_effect_method_chain_builder_h *builder); + +/** + * @internal + * @brief Appends an effect method to the chain builder. + * @since_tizen 9.0 + * + * @param[in] builder The chain builder to which the effect method will be added + * @param[in] aio_method The effect method to append + * @return @c 0 on success, + * otherwise a negative error value + * @retval #AUDIO_IO_ERROR_NONE Successful + * @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation + * @see audio_io_create_effect_method_chain_builder() + */ int audio_io_append_effect_method_chain_builder(audio_io_effect_method_chain_builder_h builder, audio_io_effect_method_e aio_method); + +/** + * @internal + * @brief Builds the effect method chain from the builder. + * @since_tizen 9.0 + * + * @param[in] builder The chain builder to be used + * @param[out] chain The handle to the created effect method chain + * @param[out] adjust_framesize The adjusted frame size for the effect chain + * @return @c 0 on success, + * otherwise a negative error value + * @retval #AUDIO_IO_ERROR_NONE Successful + * @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #AUDIO_IO_ERROR_OUT_OF_MEMORY Out of memory + * @see audio_io_create_effect_method_chain_builder() + * @see audio_io_append_effect_method_chain_builder() + */ int audio_io_build_effect_method_chain(audio_io_effect_method_chain_builder_h builder, audio_io_effect_method_chain_h *chain, size_t *adjust_framesize); + +/** + * @internal + * @brief Applies an effect method chain to the input audio data. + * @since_tizen 9.0 + * + * @param[in] chain The effect method chain to apply + * @param[in] in Input audio data buffer + * @param[in] ref Reference audio data buffer (optional) + * @param[out] out Output audio data buffer (processed) + * @return @c 0 on success, + * otherwise a negative error value + * @retval #AUDIO_IO_ERROR_NONE Successful + * @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #AUDIO_IO_ERROR_INVALID_OPERATION Invalid operation + * @see audio_io_create_effect_method_chain_builder() + * @see audio_io_append_effect_method_chain_builder() + * @see audio_io_build_effect_method_chain() + */ int audio_io_apply_effect_method_chain(audio_io_effect_method_chain_h chain, const char *in, const char *ref, char *out); + +/** + * @internal + * @brief Destroys the effect method chain builder. + * @since_tizen 9.0 + * + * @param[in] builder The handle to the effect method chain builder to be destroyed + * @return @c 0 on success, + * otherwise a negative error value + * @retval #AUDIO_IO_ERROR_NONE Successful + * @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter + * @see audio_io_create_effect_method_chain_builder() + */ int audio_io_destroy_effect_method_chain_builder(audio_io_effect_method_chain_builder_h builder); + +/** + * @internal + * @brief Destroys the effect method chain. + * @since_tizen 9.0 + * + * @param[in] chain The handle to the effect method chain to be destroyed + * @return @c 0 on success, + * otherwise a negative error value + * @retval #AUDIO_IO_ERROR_NONE Successful + * @retval #AUDIO_IO_ERROR_INVALID_PARAMETER Invalid parameter + * @see audio_io_create_effect_method_chain_builder() + * @see audio_io_build_effect_method_chain() + */ int audio_io_destroy_effect_method_chain(audio_io_effect_method_chain_h chain); +/** + * @} + */ + #ifdef __cplusplus } #endif -#endif +#endif // __TIZEN_MEDIA_AUDIO_IO_INTERNAL_H__ diff --git a/packaging/capi-media-audio-io.spec b/packaging/capi-media-audio-io.spec index 5bcd293..580771b 100644 --- a/packaging/capi-media-audio-io.spec +++ b/packaging/capi-media-audio-io.spec @@ -1,6 +1,6 @@ Name: capi-media-audio-io Summary: An Audio Input & Audio Output library in Tizen Native API -Version: 0.5.69 +Version: 0.5.70 Release: 0 Group: Multimedia/API License: Apache-2.0 -- 2.7.4