mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-24 22:43:35 +00:00
embedded: get audio sink frequency from hal_audio.h
This commit is contained in:
parent
cad11d886b
commit
adeab31f52
@ -158,7 +158,7 @@ static int btstack_audio_embedded_sink_init(
|
||||
}
|
||||
|
||||
static uint32_t btstack_audio_embedded_sink_get_samplerate() {
|
||||
return BSP_AUDIO_OUT_GetFrequency();
|
||||
return hal_audio_sink_get_frequency();
|
||||
}
|
||||
|
||||
static uint32_t source_samplerate = 0;
|
||||
|
@ -65,6 +65,15 @@ void hal_audio_sink_init(uint8_t channels,
|
||||
uint32_t sample_rate,
|
||||
void (*buffer_played_callback)(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 hal_audio_sink_init() to adjust the
|
||||
* audio frequency.
|
||||
*/
|
||||
uint32_t hal_audio_sink_get_frequency(void);
|
||||
|
||||
/**
|
||||
* @brief Get number of output buffers in HAL
|
||||
* @returns num buffers
|
||||
|
Loading…
x
Reference in New Issue
Block a user