mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-23 00:17:24 +00:00
Further template BlockDecimator by element type, use for audio buffer.
Appropriating for use as a buffer accumulator that will save up enough audio samples to put into an audio DMA buffer.
This commit is contained in:
@@ -57,6 +57,17 @@ void AudioOutput::write(
|
||||
|
||||
void AudioOutput::write(
|
||||
const buffer_f32_t& audio
|
||||
) {
|
||||
block_buffer.feed(
|
||||
audio,
|
||||
[this](const buffer_f32_t& buffer) {
|
||||
this->on_block(buffer);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void AudioOutput::on_block(
|
||||
const buffer_f32_t& audio
|
||||
) {
|
||||
const auto audio_present_now = squelch.execute(audio);
|
||||
|
||||
|
Reference in New Issue
Block a user