Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Glitch when Playing Audio from SD card in Teensy 3.2

  1. #1
    Junior Member
    Join Date
    Apr 2020
    Location
    India
    Posts
    9

    Glitch when Playing Audio from SD card in Teensy 3.2

    When Playing Audio from SD card through Teensy 3.2. I am getting Glitch in between at random intervals and it is happening in all audio files. Initially I thought, the problem would be in my WAV audio file. But the file is clean. I recorded the Audio using Audacity to see the comparison between the played audio from Teensy 3.2 and WAV file which I loaded onto SD card.
    For Testing purpose I am using WavFilePlayerUSB.ino code. I have added the screenshot of the comparison and link for the audio file where I am getting the glitch.
    I also tried using Linear Power Supply even that didn't solved the Problem. I don't know why it is happening with the Audio Shield.

    https://drive.google.com/file/d/12bo...6XyafSjFG/view

    Click image for larger version. 

Name:	Recorded _Audio.JPG 
Views:	7 
Size:	183.5 KB 
ID:	21017

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,491
    2 questions.

    How are you making this recording? Is it the headphone or line out of Teensy connected to the line-in on your PC?

    Can you show a time scale somehow?

    Without knowing more, I can at least say the most common problem is ground loops. You said you "tried using Linear Power Supply", but no info about that power supply or what other connections your had during the test. The best way to check for a ground loop is to run from a battery, or from a power supply you know is "floating". Unplug the USB cable during that sort of test, since the digital ground of USB is very likely to cause this sort of issue while you also have the analog ground of the line out connected to the same PC. Or you could try recording the a battery powered device that definitely has no ground connections, like a Zoom H1, if you having access to that sort of recording gear.

  3. #3
    Junior Member
    Join Date
    Apr 2020
    Location
    India
    Posts
    9
    Sorry for the delay Paul.

    For recording the audio I used Audacity with USB Cable connected to the PC and Teensy 3.2, after the recording I was listening to the audio using Headphone Jack of the PC.
    I have attached the pictures with the TimeScale of the Glitch in Audio Signal.

    For Testing purpose I connected Liner Power Supply --> Teensy 3.2 with AudioShield --> Speaker. I used Headphone Jack of Teensy AudioShield, then connected to the Speaker. As mentioned by you I also tried powering the Teensy using the Lithium polymer Battery and then tried playing the audio using Headphone Jack of Teensy , still I was getting the Glitches in between at random intervals.

    Yesterday I then tried MP3-Player Lib
    https://forum.pjrc.com/threads/27059...b-with-example

    to play the audio files. I thought the cause might be with my audio file because I was converting the mp3 file from mp3 format to wav. I even tried with mp3 format still the Glitches were there
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	1st_Clip.JPG 
Views:	6 
Size:	108.2 KB 
ID:	21098   Click image for larger version. 

Name:	2nd_Clip.JPG 
Views:	5 
Size:	55.4 KB 
ID:	21099  


  4. #4
    Junior Member
    Join Date
    Apr 2020
    Location
    India
    Posts
    9
    Finally, the Problem is solved. Issue was with the SD Card. I was using SanDisk 8GB Class 4 MicroSD card I replaced it with the Samsung Evo 16GB Class 10. There were No Glitches Nothing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •