From 3511852f39cd5023ec8e6d0b94cc69f34e9201ed Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 3 Aug 2023 15:32:28 +1000 Subject: Add very limited resampling (it's slow as shit) --- src/drivers/bluetooth.cpp | 2 +- src/drivers/i2s_dac.cpp | 1 - src/drivers/include/bluetooth.hpp | 19 ++++++++++--------- src/drivers/include/i2s_dac.hpp | 6 ++---- 4 files changed, 13 insertions(+), 15 deletions(-) (limited to 'src/drivers') diff --git a/src/drivers/bluetooth.cpp b/src/drivers/bluetooth.cpp index 9748522f..a02fa620 100644 --- a/src/drivers/bluetooth.cpp +++ b/src/drivers/bluetooth.cpp @@ -5,7 +5,7 @@ namespace drivers { auto Bluetooth::Enable() -> Bluetooth* { - return nullptr; + return nullptr; } } // namespace drivers diff --git a/src/drivers/i2s_dac.cpp b/src/drivers/i2s_dac.cpp index c835fb1f..885321d1 100644 --- a/src/drivers/i2s_dac.cpp +++ b/src/drivers/i2s_dac.cpp @@ -161,7 +161,6 @@ auto I2SDac::Reconfigure(Channels ch, BitsPerSample bps, SampleRate rate) word_length = 0b10; break; case BPS_32: - // TODO(jacqueline): Error on this? It's not supported anymore. slot_config_.data_bit_width = I2S_DATA_BIT_WIDTH_32BIT; slot_config_.ws_width = 32; word_length = 0b11; diff --git a/src/drivers/include/bluetooth.hpp b/src/drivers/include/bluetooth.hpp index f3a4b2ac..22b58c8b 100644 --- a/src/drivers/include/bluetooth.hpp +++ b/src/drivers/include/bluetooth.hpp @@ -6,14 +6,15 @@ namespace drivers { class Bluetooth { - public: - static auto Enable() -> Bluetooth*; - Bluetooth(); - ~Bluetooth(); + public: + static auto Enable() -> Bluetooth*; + Bluetooth(); + ~Bluetooth(); - struct Device {}; - auto Scan() -> std::vector; - private: - }; + struct Device {}; + auto Scan() -> std::vector; -} + private: +}; + +} // namespace drivers diff --git a/src/drivers/include/i2s_dac.hpp b/src/drivers/include/i2s_dac.hpp index 06c0dc16..889ba68c 100644 --- a/src/drivers/include/i2s_dac.hpp +++ b/src/drivers/include/i2s_dac.hpp @@ -51,14 +51,12 @@ class I2SDac { BPS_32 = I2S_DATA_BIT_WIDTH_32BIT, }; enum SampleRate { - SAMPLE_RATE_11_025 = 11025, - SAMPLE_RATE_16 = 16000, - SAMPLE_RATE_22_05 = 22050, + SAMPLE_RATE_8 = 8000, SAMPLE_RATE_32 = 32000, SAMPLE_RATE_44_1 = 44100, SAMPLE_RATE_48 = 48000, + SAMPLE_RATE_88_2 = 88200, SAMPLE_RATE_96 = 96000, - SAMPLE_RATE_192 = 192000, }; auto Reconfigure(Channels ch, BitsPerSample bps, SampleRate rate) -> void; -- cgit v1.2.3