@@ -55,6 +55,74 @@ esp_gmf_err_t esp_gmf_audio_param_set_dest_bits(esp_gmf_element_handle_t self, u
5555 */
5656esp_gmf_err_t esp_gmf_audio_param_set_dest_ch (esp_gmf_element_handle_t self , uint8_t dest_ch );
5757
58+ /**
59+ * @brief Set speed for audio element
60+ *
61+ * @param[in] handle Audio element handle
62+ * @param[in] speed Audio playback speed
63+ *
64+ * @return
65+ * - ESP_GMF_ERR_OK On success
66+ * - ESP_GMF_ERR_NOT_FOUND Not found the method
67+ * - ESP_GMF_ERR_MEMORY_LACK Failed to allocate memory
68+ * - Others Failed to apply method
69+ */
70+ esp_gmf_err_t esp_gmf_audio_param_set_speed (esp_gmf_element_handle_t self , float speed );
71+
72+ /**
73+ * @brief Set pitch for audio element
74+ *
75+ * @param[in] handle Audio element handle
76+ * @param[in] pitch Audio pitch to set
77+ *
78+ * @return
79+ * - ESP_GMF_ERR_OK On success
80+ * - ESP_GMF_ERR_NOT_FOUND Not found the method
81+ * - ESP_GMF_ERR_MEMORY_LACK Failed to allocate memory
82+ * - Others Failed to apply method
83+ */
84+ esp_gmf_err_t esp_gmf_audio_param_set_pitch (esp_gmf_element_handle_t self , float pitch );
85+
86+ /**
87+ * @brief Set ALC certain channel gain for audio element
88+ *
89+ * @param[in] handle Audio element handle
90+ * @param[in] ch_idx Channel index (0: Left channel 1: Right Channel 0xFF: All channels)
91+ * @param[in] gain_db ALC gain (unit decibel)
92+ *
93+ * @return
94+ * - ESP_GMF_ERR_OK On success
95+ * - ESP_GMF_ERR_NOT_FOUND Not found the method
96+ * - ESP_GMF_ERR_MEMORY_LACK Failed to allocate memory
97+ * - Others Failed to apply method
98+ */
99+ esp_gmf_err_t esp_gmf_audio_param_set_alc_channel_gain (esp_gmf_element_handle_t self , uint8_t ch_idx , float gain_db );
100+
101+ /**
102+ * @brief Set ALC gain for all channels
103+ */
104+ #define esp_gmf_audio_param_set_alc_gain (self , gain_db ) esp_gmf_audio_param_set_alc_channel_gain(self, 0xFF, gain_db)
105+
106+ /**
107+ * @brief Set fade in/out direction for audio element
108+ *
109+ * @param[in] handle Audio element handle
110+ * @param[in] is_fade_in Whether fade in or out
111+ *
112+ * @return
113+ * - ESP_GMF_ERR_OK On success
114+ * - ESP_GMF_ERR_NOT_FOUND Not found the method
115+ * - ESP_GMF_ERR_MEMORY_LACK Failed to allocate memory
116+ * - Others Failed to apply method
117+ */
118+ esp_gmf_err_t esp_gmf_audio_param_set_fade (esp_gmf_element_handle_t self , bool is_fade_in );
119+
120+ /**
121+ * @brief Helper wrapper for fade in and fade out setting
122+ */
123+ #define esp_gmf_audio_param_set_fade_in (self ) esp_gmf_audio_param_set_fade(self, true);
124+ #define esp_gmf_audio_param_set_fade_out (self ) esp_gmf_audio_param_set_fade(self, false);
125+
58126#ifdef __cplusplus
59127}
60128#endif
0 commit comments