Procházet zdrojové kódy

Fix Issue #20 - AudioFilterFIR should receive data as read-only blocks

dds
Pete (El Supremo) před 10 roky
rodič
revize
28f93925d2
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. +4
    -4
      filter_fir.cpp

+ 4
- 4
filter_fir.cpp Zobrazit soubor

@@ -50,12 +50,12 @@ void AudioFilterFIR::update(void)
// do passthru
if(coeff_p == FIR_PASSTHRU) {
// Just passthrough
block = receiveWritable(0);
block = receiveReadOnly(0);
if(block) {
transmit(block,0);
release(block);
}
block = receiveWritable(1);
block = receiveReadOnly(1);
if(block) {
transmit(block,1);
release(block);
@@ -63,7 +63,7 @@ void AudioFilterFIR::update(void)
return;
}
// Left Channel
block = receiveWritable(0);
block = receiveReadOnly(0);
// get a block for the FIR output
b_new = allocate();
if(block && b_new) {
@@ -75,7 +75,7 @@ void AudioFilterFIR::update(void)
if(b_new)release(b_new);

// Right Channel
block = receiveWritable(1);
block = receiveReadOnly(1);
b_new = allocate();
if(block && b_new) {
arm_fir_q15(&r_fir_inst, (q15_t *)block->data, (q15_t *)b_new->data, AUDIO_BLOCK_SAMPLES);

Načítá se…
Zrušit
Uložit