Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Minim pause() does not work

$
0
0

Hi,

I am working on a tangible music player with Arduino and for this I am using the minim library. However, the player.pause() function does not work in my code. It only stops the song for a few milliseconds and then continues to play the song.

The code for the pause function is as the following:

    boolean state = false;

    if (keyPressed) {
        if (key == 'p' && !state) {
          state = true;
          player[currentSong].pause();
        }
        else if (key == 'p' && state) {
        state = false;
        player[currentSong].play();
      }

Is there something else that I have to add in order to let it pause until I press the P key again?


Viewing all articles
Browse latest Browse all 2896

Trending Articles