Forum Rule: Always post complete source code & details to reproduce any issue!
Page 6 of 6 FirstFirst ... 4 5 6
Results 126 to 134 of 134

Thread: MP3-Player Lib, with example

  1. #126
    Senior Member xxxajk's Avatar
    Join Date
    Nov 2013
    Location
    Buffalo, NY USA
    Posts
    528
    is fn pointing to a valid MP3 content?

  2. #127
    Yes, fn is pointing to valid MP3 content.
    I have both a "next" and "previous" button and I can cycle back & forth between two files that play just fine. If I cycle too many times the player locks up and no longer responds to buttons. Any serial debugging statements stop printing.

  3. #128
    Senior Member xxxajk's Avatar
    Join Date
    Nov 2013
    Location
    Buffalo, NY USA
    Posts
    528
    Smells like a race condition.
    I can't verify it or anything myself right now, because I'm way too deep in work here.

  4. #129
    I think I've corrected the problem. I've used my Next/Prev button ~30 times now without an issue.
    I added the line:
    if (o->playing != codec_playing) return;
    to the top of decodeMp3() in play_sd_mp3.cpp.
    I also had to move the
    playing = codec_playing;
    line in play() to be before decodeMP3() is called instead of one of the last lines in play().

    I've attached my updated version of play_sd_mp3.cpp
    Attached Files Attached Files

  5. #130
    Is there any updates to this thread on MP3 library (i.e. does this now work with the audio.h library or something different)? Can it work with Paul's FFT function from the audio library? On a different note, has anyone attempted to read audio files directly from the USB "debug" port on the Teesny 3.2 or 3.5? It would be alot easier for users to plug in a USB thumb drive with music files rather than the SD card. If not does anyone know if such a audio board exists with USB interface?

  6. #131
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    Quote Originally Posted by jshooks View Post
    Is there any updates to this thread on MP3 library (i.e. does this now work with the audio.h library or something different)? Can it work with Paul's FFT function from the audio library? On a different note, has anyone attempted to read audio files directly from the USB "debug" port on the Teesny 3.2 or 3.5? It would be alot easier for users to plug in a USB thumb drive with music files rather than the SD card. If not does anyone know if such a audio board exists with USB interface?
    It always worked with the audiolibrary and every part of it.

  7. #132
    Junior Member
    Join Date
    Oct 2017
    Posts
    7
    Hello!

    Thank for the giant work! The library really rocks!
    But is there a way to play 2 mp3 files simultaniously? I need to mix 2 mp3 files using mixer audio object from Teensy audio library. But when I try to play 2 mp3 files or 1 mp3+ 1 aac only one file plays.

  8. #133
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    No sorry, the time I wrote it, the Teensy 3.2 was the biggest model, with the most memory. But it was not enough to play two files simultanously.

  9. #134
    Junior Member
    Join Date
    Oct 2017
    Posts
    7
    Quote Originally Posted by Frank B View Post
    No sorry, the time I wrote it, the Teensy 3.2 was the biggest model, with the most memory. But it was not enough to play two files simultanously.
    Do you plan update your library to support multiple file decoding for teensy 3.5-3.6? It would be really useful function!

Posting Permissions

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