Name

playFor()

Class

AudioSample

Description

Starts the playback of the audiosample for the specified duration or to the end of the audiosample, whichever comes first.

Syntax

  • audiosample.playFor(duration)
  • audiosample.playFor(duration, cue)

Parameters

  • duration(float)duration that this audiosample should be played back for, in seconds. If the start position plus duration exceeds the total duration of the sample, playback will stop at the end of the sample.
  • cue(float)position in the audiosample that playback should start from, in seconds.

Return

  • void