File tree Expand file tree Collapse file tree
examples/AudioOutputI2SQuad_F32_Example Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Demonstration of AudioOutputI2SQuad_F32 four channel I2S output object.
2- // Greg Raven KF5N October 2025.
2+ // Greg Raven KF5N November 2025.
33// The first left and right channels are output on pin 7, which drives the
44// Teensy Audio Adapter (Teensy 4.1). The second left and right channels are output on pin 32 (Teensy 4.1).
55
88#include < OpenAudio_ArduinoLibrary.h>
99#include < AudioStream_F32.h>
1010
11- const float sample_rate_Hz = 48000.0 ;
11+ const int sample_rate_Hz = 48000 ;
1212const int audio_block_samples = 128 ; // Always 128
1313
1414AudioControlSGTL5000 sgtl5000_1;
@@ -30,13 +30,14 @@ void setup() {
3030 Serial.print (CrashReport);
3131 }
3232
33+ /* DMA debug code.
3334 uint32_t* dmaErrors;
3435 dmaErrors = (uint32_t*)(0x400E8000 + 0x4);
3536 Serial.printf("DMA errors = %u\n", *dmaErrors);
37+ */
3638
3739 sgtl5000_1.enable ();
3840 sgtl5000_1.setAddress (LOW);
39- AudioMemory (10 );
4041 AudioMemory_F32 (10 );
4142 sgtl5000_1.volume (0.8 ); // Set headphone volume.
4243 sgtl5000_1.unmuteHeadphone ();
You can’t perform that action at this time.
0 commit comments