uses AudioFormat
uses AudioTrack
/* {"description" : "Data type to report audio track events."} */
data TrackEvent {
AudioTrack track
}
/* {"description" : "This API supports low-level audio output. AudioTrack objects submitted to play on an output instance must contain audio frames in a format that matches the AudioFormat which which an AudioOut object is instantiated (no format conversion is performed)."} */
interface AudioOut {
/* {"@description" : "An event of this type is emitted when a track finishes playing (due to its last frame being output)."} */
event trackFinished(TrackEvent e)
/* {"@description" : "Create a new audio output instance with a given format."} */
AudioOut(store AudioFormat format)
/* {"@description" : "Play the audio frames in an audio track. The audio frames must match the audio format with which this instance has been constructed (such as channel counts)."} */
bool play(store AudioTrack track)
/* {"@description" : "Stop an in-progress track, removing it from output."} */
void stop(AudioTrack track)
/* {"@description" : "Stop all audio playback from this output instance."} */
void stopAll()
}To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n io.audio.AudioOut -m "reason for update" -u yourUsername
Version 1 (this version) by barry
Notes for this version: Adds core audio output API