Redid zeroing in begin() to not zero non-floats

master
boblark 1 month ago
parent 7a57dfc7b8
commit 8f091dad1e
  1. 6
      output_spdif3_f32.cpp

@ -19,6 +19,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE. * THE SOFTWARE.
*/ */
// Redid zeroing in begin() to not zero non-floats with memset(). Bob Larkin 9 Oct 2024
/* /*
http://www.hardwarebook.info/S/PDIF http://www.hardwarebook.info/S/PDIF
https://www.mikrocontroller.net/articles/S/PDIF https://www.mikrocontroller.net/articles/S/PDIF
@ -74,8 +75,9 @@ void AudioOutputSPDIF3_F32::begin(void)
block_left_1st = nullptr; block_left_1st = nullptr;
block_right_1st = nullptr; block_right_1st = nullptr;
memset(&block_silent, 0, sizeof(block_silent)); //memset(&block_silent, 0, sizeof(block_silent)); // Was 25 Aug 2024
for(int i=0; i<block_silent.length; i++) // Now 25 Aug 2024 RSL
block_silent.data[i] = 0.0f;
config_spdif3(sample_rate_Hz); config_spdif3(sample_rate_Hz);
const int nbytes_mlno = 2 * 4; // 8 Bytes per minor loop const int nbytes_mlno = 2 * 4; // 8 Bytes per minor loop

Loading…
Cancel
Save