play
Audio playback
Syntax
y = play ( x,repeat[=1],devID[=""] )
y = play ( handle,x,repeat[=1],devID[=""] )
y = handle.play ( x,repeat[=1],devID[=""] )
Inputs
| Argument | Type | Description | Unit |
|---|---|---|---|
handle | audio handle | handle to audio playback | n/a |
x | audio | audio signal | - |
repeat | scalar | number of repeats | - |
devID | text | string identifier of the playback device (NOT YET IMPLEMENTED--as of AUXLAB 1.44) | - |
Outputs / Return Value
y:yis either an audio handle, either newly created or existing.yis -1 if the playback fails or the specified handle is invalid.
Notes
- If devID is not specified, the default device or the last device selected for playback will be used.
- If play is called for the audio handle,
handleis queued in the back of the playback list and played when the existing list is exhausted. If play is called for an audio signal, a new audio handle is generated.
Examples
To play x (and don't care about asynchronous playing),
play(x)
To play x and, then, y in sequence
h=play(x)
h.play(y) while x is played.
If h.play(y) is given after playing x is done, it doesn't play and returns -1
See Also
Review Status
- Legacy parameter naming does not exactly match current engine metadata and should be reviewed manually.