mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-30 10:09:25 -04: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:
parent
aead1d8798
commit
a558565886
8 changed files with 23 additions and 20 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue