mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-22 01:52:41 +00:00
Resolve Soundboard tone key issue (#1806)
* Resolve Soundboard tone key issue
This commit is contained in:
@@ -30,6 +30,13 @@
|
||||
|
||||
class AudioStatsCollector {
|
||||
public:
|
||||
template <typename Callback>
|
||||
void feed(const buffer_s16_t& src, Callback callback) {
|
||||
if (feed(src)) {
|
||||
callback(statistics);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename Callback>
|
||||
void feed(const buffer_f32_t& src, Callback callback) {
|
||||
if (feed(src)) {
|
||||
@@ -52,10 +59,12 @@ class AudioStatsCollector {
|
||||
|
||||
AudioStatistics statistics{};
|
||||
|
||||
void consume_audio_buffer(const buffer_s16_t& src);
|
||||
void consume_audio_buffer(const buffer_f32_t& src);
|
||||
|
||||
bool update_stats(const size_t sample_count, const size_t sampling_rate);
|
||||
|
||||
bool feed(const buffer_s16_t& src);
|
||||
bool feed(const buffer_f32_t& src);
|
||||
bool mute(const size_t sample_count, const size_t sampling_rate);
|
||||
};
|
||||
|
Reference in New Issue
Block a user