- audio_stream ->initialise: format=[{u8,s8,s16,s32,f32,encoded}],
frequency=[1..], channels=[1..8]
- Create a stream. The default format is
encoded. The
defaults for raw data are 44100 samples per second and 2 channels.
- audio_stream ->write_as_file: at=[int],
data=char_array
- Queue data. Used by pce_open/3.
Waits while the stream is playing far ahead.
- audio_stream ->append: data=char_array
- Queue data, as audio_stream
->write_as_file.
- audio_stream ->truncate_as_file:
- Discard the queued data. pce_open/3
sends this when opening the stream in
write mode. For
encoded data, the next write starts a new file.
- audio_stream ->close_as_file:
- The data has ended. Sent when the Prolog stream opened using
pce_open/3 is
closed.
- audio_stream ->close:
- The data has ended.
- audio_stream ->play:
- Start playing the queued data and the data written later.
- audio_stream ->stop:
- Stop playing and discard the queued data. audio_stream
<-message
is not executed. Writes fail silently until audio_stream->play
or audio_stream->truncate_as_file,
so a producer that writes to the stream ends.
- audio_stream ->drain:
- Process events until all queued data is played.