Reference   Language | Libraries | Comparison | Changes

ArduinoSound

AudioOutI2S.isPlaying()

Description

Query if the input started using play() or loop() is currently playing

Syntax

AudioOutI2S.isPlaying();

Returns

1 if input is currently playing, 0 otherwise

Example


  // check if playback is still going on
  if (!AudioOutI2S.isPlaying()) {
    // playback has stopped

    Serial.println("playback stopped");
    while (1); // do nothing
  }

See also

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.