summaryrefslogtreecommitdiff
path: root/src/drivers/include
diff options
context:
space:
mode:
authorcooljqln <cooljqln@noreply.codeberg.org>2024-05-09 06:24:14 +0000
committercooljqln <cooljqln@noreply.codeberg.org>2024-05-09 06:24:14 +0000
commitb720ba42a0f7645e1f6c3925e92971778c309e94 (patch)
tree03be2c6fbc1496e48d465f2ec3510d11ab4d73d9 /src/drivers/include
parent344a46d0664eb75d232eacea91a4957a25e071f6 (diff)
parent690c64c151777121afc2b39868f73b0fe666458e (diff)
downloadtangara-fw-b720ba42a0f7645e1f6c3925e92971778c309e94.tar.gz
Merge pull request 'Factor gapless handling out of audio_fsm and into the audio pipeline' (#69) from jqln/audio-pipeline into main
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/69 Reviewed-by: ailurux <ailurux@noreply.codeberg.org>
Diffstat (limited to 'src/drivers/include')
-rw-r--r--src/drivers/include/drivers/bluetooth.hpp3
-rw-r--r--src/drivers/include/drivers/i2s_dac.hpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/drivers/include/drivers/bluetooth.hpp b/src/drivers/include/drivers/bluetooth.hpp
index 5960de7e..ad61fcc1 100644
--- a/src/drivers/include/drivers/bluetooth.hpp
+++ b/src/drivers/include/drivers/bluetooth.hpp
@@ -13,10 +13,10 @@
#include <freertos/stream_buffer.h>
#include <stdint.h>
#include "drivers/bluetooth_types.hpp"
+#include "drivers/nvs.hpp"
#include "esp_a2dp_api.h"
#include "esp_avrc_api.h"
#include "esp_gap_bt_api.h"
-#include "drivers/nvs.hpp"
#include "tasks.hpp"
#include "tinyfsm.hpp"
#include "tinyfsm/include/tinyfsm.hpp"
@@ -44,6 +44,7 @@ class Bluetooth {
auto SetSource(StreamBufferHandle_t) -> void;
auto SetVolumeFactor(float) -> void;
+ auto SamplesUsed() -> uint32_t;
auto SetEventHandler(std::function<void(bluetooth::Event)> cb) -> void;
};
diff --git a/src/drivers/include/drivers/i2s_dac.hpp b/src/drivers/include/drivers/i2s_dac.hpp
index 5e81f875..0776dbab 100644
--- a/src/drivers/include/drivers/i2s_dac.hpp
+++ b/src/drivers/include/drivers/i2s_dac.hpp
@@ -11,8 +11,8 @@
#include <functional>
#include <memory>
#include <optional>
-#include <utility>
#include <span>
+#include <utility>
#include "driver/i2s_std.h"
#include "driver/i2s_types.h"
@@ -71,6 +71,8 @@ class I2SDac {
auto WriteData(const std::span<const std::byte>& data) -> void;
auto SetSource(StreamBufferHandle_t buffer) -> void;
+ auto SamplesUsed() -> uint32_t;
+
// Not copyable or movable.
I2SDac(const I2SDac&) = delete;
I2SDac& operator=(const I2SDac&) = delete;