From 59acb746aeeb57bf51aeddc61a0b9ae0430abbe9 Mon Sep 17 00:00:00 2001
From: boblark
Date: Fri, 13 Jan 2023 15:21:08 -0800
Subject: [PATCH] Minor corrections for playing WAV files from SD cards
---
AudioSDPlayer_F32.cpp | 4 +-
docs/index.html | 117 +++++++++++++++++++++++++++
examples/SDWavPlayer/SDWavPlayer.ino | 36 ++++-----
3 files changed, 136 insertions(+), 21 deletions(-)
diff --git a/AudioSDPlayer_F32.cpp b/AudioSDPlayer_F32.cpp
index 032443a..8fbd229 100644
--- a/AudioSDPlayer_F32.cpp
+++ b/AudioSDPlayer_F32.cpp
@@ -630,7 +630,7 @@ bool AudioSDPlayer_F32::parse_format(void) {
rate = header[1];
currentWavData.sample_rate = header[1]; // uint32_t
- Serial.print("WAV file sample rate = "); Serial.println(rate);
+ // Serial.print("WAV file sample rate = "); Serial.println(rate);
// b2m is used to determine playing time. We base it on the WAV
// file meta data. It is allowed to be played at a different rate
@@ -665,7 +665,7 @@ bool AudioSDPlayer_F32::parse_format(void) {
else {return false;}
bytes2millis = b2m; // Transfer to global
- Serial.print(" bytes2millis = "); Serial.println(b2m);
+ // Serial.print(" bytes2Millis = "); Serial.println(b2m);
// we're not checking the byte rate and block align fields
// if they're not the expected values, all we could do is
// return false. Do any real wav files have unexpected
diff --git a/docs/index.html b/docs/index.html
index 11ef03b..249fb39 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -391,6 +391,7 @@ span.mainfunction {color: #993300; font-weight: bolder}
{"type":"AudioMathScale_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"mathScale","inputs":"1","output":"0","category":"math-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioMixer4_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"mixer4","inputs":"4","output":"0","category":"mixer-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
{"type":"AudioMixer8_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"mixer8","inputs":"8","output":"0","category":"mixer-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"1"}},
+ {"type":"AudioPlaySdWav_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"playSdWav","inputs":0,"outputs":2,"category":"play-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"2"}},
{"type":"AudioSwitch4_OA_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"switch4","inputs":"1","output":"0","category":"mixer-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"4"}},
{"type":"AudioSwitch8_OA_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"switch8","inputs":"1","output":"0","category":"mixer-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"8"}},
{"type":"FFT_Overlapped_F32","data":{"defaults":{"name":{"value":"new"}},"shortName":"blockwiseFFT","inputs":"NaN","output":"0","category":"analyze-function","color":"#E6E0F8","icon":"arrow-in.png","outputs":"NaN"}},
@@ -2558,6 +2559,122 @@ look ahead delay, as well.
+
+
+
+