Home Forums Sparkfun MP3 Shield Library Support Forum Polled mode, pause() and end()

  • This topic has 0 replies, 1 voice, and was last updated 11 years ago by Anonymous.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #2763
    Anonymous
    Inactive

    When we use the polled mode (#define USE_MP3_REFILL_MEANS USE_MP3_Polled), pause() and end() don’t work as they should.
    With gallegojm, we fixed it.

    We replace available () in SFEMP3Shield.cpp (line 1674)

    void SFEMP3Shield::available() {
    #if defined(USE_MP3_REFILL_MEANS) && USE_MP3_REFILL_MEANS == USE_MP3_SimpleTimer
    timer.run();
    #elif defined(USE_MP3_REFILL_MEANS) && USE_MP3_REFILL_MEANS == USE_MP3_Polled
    refill();
    #endif
    }

    by

    void SFEMP3Shield::available() {
    #if defined(USE_MP3_REFILL_MEANS) && USE_MP3_REFILL_MEANS == USE_MP3_SimpleTimer
    timer.run();
    #elif defined(USE_MP3_REFILL_MEANS) && USE_MP3_REFILL_MEANS == USE_MP3_Polled
        if ((playing_state != paused_playback) && (playing_state != deactivated))
    refill();
    #endif
    }

    Is that what we did is correct ?

    More information here (in french)

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.