Reference   Language | Libraries | Comparison | Changes

ArduinoSound

SDWaveFile.cue()

Description

Change the playback position of the wave file

Syntax

waveFile.cue(time);

Parameters

time: time is seconds to change playback to

Returns

1 on is the playback position was cued successfully, 0 on failure

Example


  // create a SDWaveFile
  waveFile = SDWaveFile(filename);

  // check if the WaveFile is valid
  if (!waveFile) {
    Serial.println("wave file is invalid!");
    while (1); // do nothing
  }

  /// play the file using an audio output ...

  // jump back to 10 second into the wave file
  waveFile.cue(10);

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.