diff --git a/examples/Platforms/NRF52/NRF52_PDM_PWMTest/NRF52_PDM_PWMTest.ino b/examples/Platforms/NRF52/NRF52_PDM_PWMTest/NRF52_PDM_PWMTest.ino index 138c0da..8e337b6 100644 --- a/examples/Platforms/NRF52/NRF52_PDM_PWMTest/NRF52_PDM_PWMTest.ino +++ b/examples/Platforms/NRF52/NRF52_PDM_PWMTest/NRF52_PDM_PWMTest.ino @@ -17,7 +17,7 @@ void setup() { void loop() { aaAudio.getADC(320); // Get 320 Samples from the ADC - for (int i = 0; i < 320; i++) { // Copy them into the DAC Buffer and change from signed to unsigned ( + 0x8000) + for (int i = 0; i < 320; i++) { // Copy them into the DAC Buffer aaAudio.dacBuffer16[i] = (uint16_t)(aaAudio.adcBuffer16[i]); } aaAudio.feedDAC(0,320); // Feed the DAC with the ADC data diff --git a/src/NRF52840/AutoAnalogAudio.cpp b/src/NRF52840/AutoAnalogAudio.cpp index e7b2082..c202260 100644 --- a/src/NRF52840/AutoAnalogAudio.cpp +++ b/src/NRF52840/AutoAnalogAudio.cpp @@ -132,6 +132,8 @@ void AutoAnalog::setSampleRate(uint32_t sampRate, bool stereo){ if(stereo){ NRF_I2S->CONFIG.CHANNELS = I2S_CONFIG_CHANNELS_CHANNELS_STEREO << I2S_CONFIG_CHANNELS_CHANNELS_Pos; + }else{ + NRF_I2S->CONFIG.CHANNELS = I2S_CONFIG_CHANNELS_CHANNELS_LEFT << I2S_CONFIG_CHANNELS_CHANNELS_Pos; } if(sampRate <= 16000){