message: output_i2s_f32: output zeros if no audio is in-coming
diff: @@ -695,7 +695,11 @@ void AudioOutputI2S_F32::update(void)
  // Serial.println(block_f32_scaled->data[30]);
  // count=0;
  //}
  -
  + AudioStream_F32::transmit(block_f32,0);//echo the incoming audio out the outputs
  + } else {
  + //fill with zeros
  + for (int i=0; i<audio_block_samples; i++) block_f32_scaled->data[i] = 0.0f;
  + }
  //now process the data blocks
  __disable_irq();
  @@ -714,11 +718,8 @@ void AudioOutputI2S_F32::update(void)
  __enable_irq();
  AudioStream_F32::release(tmp);
  }
  - AudioStream_F32::transmit(block_f32,0); AudioStream_F32::release(block_f32); //echo the incoming audio out the outputs
  - } else {
  - //this branch should never get called, but if it does, let's release the buffer that was never used
  - AudioStream_F32::release(block_f32_scaled);
  - }
  + AudioStream_F32::release(block_f32);
  +
  block_f32_scaled = block2_f32_scaled; //this is simply renaming the pre-allocated buffer
  block_f32 = receiveReadOnly_f32(1); // input 1 = right channel
  @@ -727,6 +728,11 @@ void AudioOutputI2S_F32::update(void)
  //block_f32_scaled = AudioStream_F32::allocate_f32();
  //scale_f32_to_i32(block_f32->data, block_f32_scaled->data, audio_block_samples);
  scale_f32_to_i16(block_f32->data, block_f32_scaled->data, audio_block_samples);
  + AudioStream_F32::transmit(block_f32,1);//echo the incoming audio out the outputs
  + } else {
  + //fill with zeros
  + for (int i=0; i<audio_block_samples; i++) block_f32_scaled->data[i] = 0.0f;
  + }
  __disable_irq();
  if (block_right_1st == NULL) {
  @@ -744,11 +750,8 @@ void AudioOutputI2S_F32::update(void)
  __enable_irq();
  AudioStream_F32::release(tmp);
  }
  - AudioStream_F32::transmit(block_f32,1); AudioStream_F32::release(block_f32); //echo the incoming audio out the outputs
  - } else {
  - //this branch should never get called, but if it does, let's release the buffer that was never used
  - AudioStream_F32::release(block_f32_scaled);
  - }
  + AudioStream_F32::release(block_f32);
  +
  }
  #if defined(KINETISK) || defined(KINETISL)
  