Streams and decodes audio data for playback by a source. Derives from the virtual Sound class.
Add a new synchronization point with the given name to the stream at the given sample number.
Remove the synchronization point with the given name from the stream.
The default frequency (sampling rate) of the audio data.
The default volume of the audio data. Values range from 0 to 255.
The default priority of the audio data indicating how easily it can be preempted when channels are limited. Values range between 0 and 255.
The default loop mode of the audio data. The value is one of the pySonic.Constants.FSOUND_LOOP_* flags.
The length of the audio data in samples (not bytes).
The number of synchronization points in the stream.
The length of the sample in seconds when played at its default frequency.
Streams audio data from disk for playback. Derives from Stream.
Creates a stream of audio data from the given file on disk. The pySonic.Constants.FSOUND_NORMAL flag is specified for the audio data by default. Any extra arguments will override the default flag with the specified pySonic.Constants.FSOUND_* flags.
Stream audio data already in memory for playback. Derives from Stream.
Creates a stream from the audio data specified in buffer. The number of channels (1 or 2), bits per sample (8 or 16), and frequency must be specified. Any extra arguments will be treated as pySonic.Constants.FSOUND_* flags.
The MemorySample object holds a reference to the buffer you pass to it. The audio data is streamed directly from this buffer. Changing the length of the buffer during playback could have disastrous results.
Streams audio data from a file on the Web. Derives from Stream.
Creates a stream of audio data from the given URL on the Web. The pySonic.Constants.FSOUND_NORMAL and pySonic.Constants.FSOUND_NET_STREAM flags are specified for the audio data by default. Any extra arguments will override the default pySonic.Constants.FSOUND_NORMAL flag with the specified pySonic.Constants.FSOUND_* flags. The pySonic.FSOUND_NET_STREAM flag is always set.
The URL must start with http://. The file specified by the URL must end with .mp3 or .ogg. These are both FMOD limitations.
Future version of pySonic will always set the pySonic.Constants.FSOUND_NET_STREAM flag, even if other flags are given to the constructor.
The status of the Web stream. The first value is one of the pySonic.Constants.FSOUND_STREAM_NET_* flags representing the ready status of the stream. The second value is the size of the local buffer used by the stream. The third value is the desired bitrate of the stream. The fourth value is a combination of the pySonic.Constants.FSOUND_PROTOCOL_* and pySonic.Constants.FSOUND_FORMAT_* flags indicating the transport protocol for the audio data and the format of the audio data.