diff --git a/port/stm32-f4discovery-usb/port/hal_audio_f4discovery.c b/port/stm32-f4discovery-usb/port/hal_audio_f4discovery.c index aa0e64143..85ab8f54d 100644 --- a/port/stm32-f4discovery-usb/port/hal_audio_f4discovery.c +++ b/port/stm32-f4discovery-usb/port/hal_audio_f4discovery.c @@ -157,6 +157,17 @@ int16_t * hal_audio_sink_get_output_buffer(uint8_t buffer_index){ } } +/** + * @brief Retrive the audio frequency. + * @retval AudioFreq: Audio frequency used to play the audio stream. + * @note This API should be called after the BSP_AUDIO_OUT_Init() to adjust the + * audio frequency. + */ +uint32_t hal_audio_sink_get_frequency(void) +{ + return sink_sample_rate; +} + /** * @brief Start stream */