WAV playback sounds distorted

Status
Not open for further replies.
Here are my latest results of the SD card test. Using a Sandisk SDHC Ultra Plus! 16Gb. Smallest card I could fine!

SD Card Test
------------
SD card is connected :)
Card type is SDHC
File system space is 15923.15 Mbytes.
SD library is able to access the filesystem

Reading SDTEST1.WAV:
Overall speed = 1.31 Mbyte/sec
Worst block time = 0.77 ms
26.54% of audio frame time

Reading SDTEST1.WAV & SDTEST2.WAV:
Overall speed = 1.30 Mbyte/sec
Worst block time = 1.56 ms
53.84% of audio frame time

Reading SDTEST1.WAV & SDTEST2.WAV staggered:
Overall speed = 1.30 Mbyte/sec
Worst block time = 1.18 ms
40.84% of audio frame time

Reading SDTEST1.WAV, SDTEST2.WAV, SDTEST3.WAV:
Overall speed = 1.08 Mbyte/sec
Worst block time = 7.00 ms
241.10% of audio frame time

Reading SDTEST1.WAV, SDTEST2.WAV, SDTEST3.WAV staggered:
Overall speed = 1.08 Mbyte/sec
Worst block time = 2.05 ms
70.69% of audio frame time

Reading SDTEST1.WAV, SDTEST2.WAV, SDTEST3.WAV, SDTEST4.WAV:
Overall speed = 1.00 Mbyte/sec
Worst block time = 3.58 ms
123.32% of audio frame time

Reading SDTEST1.WAV, SDTEST2.WAV, SDTEST3.WAV, SDTEST4.WAV staggered:
Overall speed = 1.00 Mbyte/sec
Worst block time = 2.45 ms
84.55% of audio frame time



Much better performance!
 
Maybe this can help
After installing new arduino 1.8.10, and then Teensyduino 1.48, I performed an update of arduino libraries.

Library SD by Arduino,SparkFun 1.2.3 was the version installed by arduino, and was located in c:\arduino\liraries\SD.
I upgraded via library manager to version 1.2.4. But it installed it in c:\users\alan\documents\arduino\libraries\SD.
The SDCardTest sketch should have loaded the teensy SD library located in c:\arduino\hardware\teensy\avr\libraries\SD when i compiled it specifying a teensy 3.2 board.
Instead it used the arduino version 1.2.4 in my documents.
Speeds were hugely different thasn expected, and loading for example Part_2_02_mixers it was impossible to play two wavs at the same time.
Obviously I was not aware of the problem and I spent several hours in 'damnation'.
Maybe some other souls in this forum have the same problem...
Solution was just to move the SD folder from c:\users\alan\documents\arduino\libraries\ to c:\arduino\libraries\ (replacing then 1.2.3 with the 1.2.4).
Restart Arduino IDE, it compiled happily using the teensy SD library.

Here are some tests I made:

Compiling with wrong lib this was the message on compile window:

....
Più di una libreria trovata per "SD.h"
Usata: C:\Users\alan\Documents\Arduino\libraries\SD
Non usata: C:\Arduino\libraries\SD
Non usata: C:\Arduino\hardware\teensy\avr\libraries\SD
.....

Each parameter has 4 values:

'SanDisk Ultra 16GB 10 A1 HC I' teensy SD lib
'Lexar 633x 16GB micro SD 1 HC I' teensy SD lib
'SanDisk Ultra 16GB 10 A1 HC I' non-teensy (bad) SD lib
'Lexar 633x 16GB micro SD 1 HC I' non-teensy (bad) SD lib


Reading SDTEST1.WAV:
Overall speed Mbyte/sec = 1.29, 1.00, 0.38, 0.35
Worst block time ms = 0.92, 1.48, 2.81, 2.92
audio frame time = 31.54%, 50.98%, 96.96%, 100.75%

Reading SDTEST1.WAV & SDTEST2.WAV:
Overall speed = 1.28, 0.89, 0.38, 0.33
Worst block time = 1.59, 2.21, 5.39, 6.82
audio frame time= 54.84%, 76.34%, 185.85%, 235.06%

Reading SDTEST1.WAV & SDTEST2.WAV staggered:
Overall speed = 1.28, 0.89, 0.38, 0.33
Worst block time = 1.20, 1.91, 4.04, 4.64
audio frame time = 41.22%, 66.00%, 139.21%, 160.10%

Reading SDTEST1.WAV, SDTEST2.WAV, SDTEST3.WAV:
Overall speed = 1.23, 0.92, 0.37, 0.34
Worst block time = 2.44, 3.43, 8.13, 9.35
audio frame time = 84.17%, 118.12%, 280.25%, 322.09%

Reading SDTEST1.WAV, SDTEST2.WAV, SDTEST3.WAV staggered:
Overall speed = 1.23, 0.92, 0.37, 0.34
Worst block time = 1.64, 2.43, 5.43, 6.42
audio frame time = 56.63%, 83.69%, 187.33%, 221.42%

Reading SDTEST1.WAV, SDTEST2.WAV, SDTEST3.WAV, SDTEST4.WAV:
Overall speed = 1.21, 0.91, 0.37, 0.33
Worst block time = 3.51, 4.68, 11.11, 12.57
audio frame time = 120.98%, 161.31%, 382.89%, 433.28%

Reading SDTEST1.WAV, SDTEST2.WAV, SDTEST3.WAV, SDTEST4.WAV staggered:
Overall speed = 1.20, 0.91, 0.37, 0.33
Worst block time = 2.32, 3.49, 7.05, 7.84 ms
audio frame time = 79.93%, 120.43%, 243.06%, 270.36%
 
Status
Not open for further replies.
Back
Top