A beep is played on top on my homemade WAV file but not for SDTEST* files

samyrabih

Member
Hi !
Happy new year to all team and forum members !
I'm currently developing an audio guestbook from scratch, based on Teensy Audio + Teensy 4.

I'm testing the AudioPlaySdWav class:
- when I use test files from https://www.pjrc.com/teensy/td_libs_AudioDataFiles.html : WAV file is played without problem
- when I use a WAV file I made from Windows integrated "audio recorder" + convert to 44100Hz using Audacity : the WAV file is played but at very low volume, and a kind of beep is played "on top" (both beep and WAV file stop at the end of the WAV file)

The Teensy Audio has this kind of mini amplifiers on output : https://www.amazon.fr/dp/B091DKXQZM
(but since it works with test files, I don't think it is the problem)

I added my own WAV file as attachment.

I output the AudioPlaySdWav directly to I2S:
Code:
AudioPlaySdWav playSdWav;
AudioOutputI2S i2s1;
AudioConnection patchCord1(playSdWav, 0, i2s1, 0);
AudioConnection patchCord2(playSdWav, 1, i2s1, 1);

If you have any idea, don't hesitate, thanks :)
 

Attachments

  • INTRO.zip
    244.6 KB · Views: 31
Last edited:
I tried other things:
- converted my WAV file using sox (following https://github.com/FrankBoesing/Teensy-WavePlayer note at the bottom of the readme): beep + very low play of the sound
- recorded a 44100hz file using Audacity: beep + very low play of the sound
- using test files from https://github.com/FrankBoesing/Teensy-WavePlayer : beep + very low play of the sound
- using TeensyWavePlayer from https://github.com/FrankBoesing/Teensy-WavePlayer with SDTEST1.wav file : only beep
- renaming my intro.wav to INTRO000.wav with regular AudioPlaySdWav: beep + very low play of the sound
- using WavFilePlayer (Teensyduino) example + my WAV file : beep + very low play of the sound
- using WavFilePlayer (Teensyduino) example + SDTEST1 : sound is OK

I enabled Serial output on play_sd_wav.cpp:

my "file who has a beep played at same time":

07:55:33.246 -> is wav file
07:55:33.246 -> header ok
07:55:33.246 -> format = 1
07:55:33.246 -> rate = 44100
07:55:33.246 -> channels = 2
07:55:33.246 -> bits = 16
07:55:33.246 -> bytes2millis = 24347887
07:55:33.246 -> audio format ok
07:55:33.246 -> chunk id = 61746164, length = 329728
07:55:33.246 -> wav: found data chunk, len=329728

SDTEST1.wav file

07:57:45.740 -> is wav file
07:57:45.740 -> header ok
07:57:45.740 -> format = 1
07:57:45.740 -> rate = 44100
07:57:45.740 -> channels = 2
07:57:45.740 -> bits = 16
07:57:45.740 -> bytes2millis = 24347887
07:57:45.740 -> audio format ok
07:57:45.740 -> chunk id = 5453494C, length = 130
07:57:45.740 -> consumed unknown chunk
07:57:45.740 -> chunk id = 61746164, length = 16787368
07:57:45.740 -> wav: found data chunk, len=16787368

# Tests not already done
- testing with my own WAV file without amplification board
 
Last edited:
Next tests will be:
- checking what is the type of this beep perhaps a 440hz glitch, or something like this)
- test with RAW files
- testing with high quality SD card (instead of random 2Gb one)

Note : my amplification board is linked to the L/R/GND pins between the jack adapter and the border of the Teensy Audio Shield (just below the text "Caution : do not short [...]")
 
Last edited:
If I plug classic headphones on the jack adapter, my INTRO.wav is perfectly played.

So it seems to be related to PAM8302 amplifier.

If I connect my phone speaker directly to L/R/GND pins (the one near jack adapter), I hear my WAV without "beep"), but very low.
 
Last edited:
There’s a reason for the Forum Rule … now you tell us you’ve been connecting the headphone virtual ground to actual ground. Do Not Do This. It’s even written on the audio adaptor’s PCB. I seem to recall doing so can cause the adaptor to make a sound, possibly like the one you’re describing. I’m not going to test this, because there’s also a possibility it’ll blow the adaptor up…

Use the line out connections, it’s what they’re for…
 
You mean connecting the PAM8302 GND to actual ground and the A- PIN of the 8302 to headphone ground ?

If yes, sorry for that, I thought these circuits were separated :(

You are right, I don't have any "audio glitch" if I use line out PINs.

I will redesign my circuit to use line out pins
 
Back
Top