Audio playback engine

Next:<audio-engine> ( device-name voice-count -- engine )


Class description
Objects of this class encapsulate the state for an active audio engine. Audio processing on an engine can be started and stopped with start-audio, start-audio*, and stop-audio. While running, update-audio must be called on an engine regularly to update source and listener attributes and refill buffers for streaming clips.

An engine object should be treated as opaque, except for the listener slot. This slot may be filled with any object implementing the Audio listener protocol protocol, which will then be used to control the position, velocity, volume, and other attributes of the listener. By default, this slot contains an audio-listener tuple with all the slots set to their initial values.


TUPLE: audio-engine < disposable
{ voice-count integer initial: 0 }
{ al-device c-ptr initial: f }
{ al-context c-ptr initial: f } al-sources listener
{ next-source integer initial: 0 } clips update-timer ;