From ff2c03fd2fe5c50b640dab096810f1c448e7ddcc Mon Sep 17 00:00:00 2001 From: gokul Date: Sun, 1 Mar 2020 12:12:13 +0530 Subject: [PATCH 1/2] Fixed the issue in the example code wherein if an Audio is played multiple times, it gets distorted overtime --- examples/SimpleAudioPlayer/SimpleAudioPlayer.ino | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/SimpleAudioPlayer/SimpleAudioPlayer.ino b/examples/SimpleAudioPlayer/SimpleAudioPlayer.ino index 9c7647b..4f299f5 100644 --- a/examples/SimpleAudioPlayer/SimpleAudioPlayer.ino +++ b/examples/SimpleAudioPlayer/SimpleAudioPlayer.ino @@ -38,7 +38,7 @@ void setup() { // 44100kHz stereo => 88200 sample rate // 100 mSec of prebuffering. - Audio.begin(88200, 100); + //Audio.begin(88200, 100); } void loop() { @@ -46,6 +46,7 @@ void loop() { // open wave file from sdcard File myFile = SD.open("test.wav"); + Audio.begin(88200, 100); if (!myFile) { // if the file didn't open, print an error and stop Serial.println("error opening test.wav"); @@ -75,7 +76,7 @@ void loop() { } } myFile.close(); - + Audio.close(); Serial.println("End of file. Thank you for listening!"); while (true) ; } From 74b35246dcc26f48d0efe6779db53967510ae530 Mon Sep 17 00:00:00 2001 From: Gokul <43350089+thelowercaseguy@users.noreply.github.com> Date: Sat, 14 Mar 2020 20:36:03 +0530 Subject: [PATCH 2/2] Update examples/SimpleAudioPlayer/SimpleAudioPlayer.ino Co-Authored-By: per1234 --- examples/SimpleAudioPlayer/SimpleAudioPlayer.ino | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/SimpleAudioPlayer/SimpleAudioPlayer.ino b/examples/SimpleAudioPlayer/SimpleAudioPlayer.ino index 4f299f5..031aee6 100644 --- a/examples/SimpleAudioPlayer/SimpleAudioPlayer.ino +++ b/examples/SimpleAudioPlayer/SimpleAudioPlayer.ino @@ -38,7 +38,6 @@ void setup() { // 44100kHz stereo => 88200 sample rate // 100 mSec of prebuffering. - //Audio.begin(88200, 100); } void loop() { @@ -80,4 +79,3 @@ void loop() { Serial.println("End of file. Thank you for listening!"); while (true) ; } -