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

Thread: General guidance needed on MP3 (22.05kHz & MTP)

  1. #1
    Junior Member
    Join Date
    Feb 2021

    General guidance needed on MP3 (22.05kHz & MTP)

    Dear community,

    looking for general guidance on MP3 with Teensy 3.6.

    I am planning to put several GBs of MP3 on the SD-card. Most are audio books, some of them with sample rates of 22.05kHz.
    At the moment I am playing MP3s natively via the Adafruit MP3 library - but 22.05kHz MP3s are not played correctly (at 50% speed).

    It looks like using the SGTL5000-based Audio shield together with the Arduino-Teensy-Codec library could work with this sample rate. True?

    However, I want to use MTP sooner or later, to directly transfer files from an external PC to the SD card.
    This seems to be possible with the Teensy's internal SD card, but I haven't found any hint that there is MTP for the Audio shield's SD card drive.

    I do not mind changing my approach, or adding/changing some hardware (shields, newer Teensy version) - but generally, what would be the recommended path to go with those two constraints?

    Or could I just modify the Adafruit MP3 library to play certain files at 22.05khz by changing the constant in the code (I fear not)
    Or use the SGTL5000 on the audio shield with the Teensy's SD-drive? (might run into performance issues?)

    Thank you!

    P.S. Just noticed that this post could have also been placed into the "Project Guidance" category. I am not against, if somebody can move it there.
    Last edited by mcleinn; 02-18-2021 at 04:52 PM.

  2. #2
    Senior Member
    Join Date
    Apr 2014
    Just converting the mp3 files to 44khz will save you a lot of time.

    MTP will work with the SD on the Audio Board.
    But its not that clear if it will work with concurrent accesses by the Audio Library players.. thats an open question as far as I know - or, better, I think nobody has tried that so far.

  3. #3
    Junior Member
    Join Date
    Feb 2021
    Thanks for the quick reply!

    In other words, as long as I don't copy files while I'm playing them, I should be fine?
    The project is a player for my baby daughter, so that wouldn't be a big problem.

    I'll think about batch conversion, just wanted to keep the effort for adding new files minimal.


Posting Permissions

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