class sound_stream :
?pitch:float -> ?volume:float -> ?position:float * float * float -> ?relative_to_listener:bool -> ?min_distance:float -> ?attenuation:float -> ?playing_offset:OcsfmlSystem.Time.t -> ?loop:bool -> SoundStream.t ->
Abstract base class for streamed audio sources.
Unlike audio buffers (see sf::SoundBuffer), audio streams are never completely loaded in memory.
Instead, the audio data is acquired continuously while the stream is playing. This behaviour allows to play a sound with no loading delay, and keeps the memory consumption very low.
Sound sources that need to be streamed are usually big files (compressed audio musics that would eat hundreds of MB in memory) or files that would take a lot of time to be received (sounds played over the network).
sf::SoundStream is a base class that doesn't care about the stream
source, which is left to the derived class. SFML provides a
built-in specialization for big files (see sf::Music).
method destroy :
method get_channel_count :
1 channel means a mono sound, 2 means stereo, etc.
Returns Number of channels
method get_loop :
method get_playing_offset :
method get_sample_rate :
The sample rate is the number of audio samples played per
second. The higher, the better the quality.
Returns Sample rate, in number of samples per second
method get_status :
method pause :
This function pauses the stream if it was playing, otherwise
(stream already paused or stopped) it has no effect.
method play :
This function starts the stream if it was stopped, resumes it if
it was paused, and restarts it from beginning if it was it
already playing. This function uses its own thread so that it
doesn't block the rest of the program while the stream is
method set_loop :
bool -> unit
If set, the stream will restart from beginning after reaching
the end and so on, until it is stopped or setLoop(false) is
called. The default looping state for streams is false.
method set_playing_offset :
OcsfmlSystem.Time.t -> unit
The playing position can be changed when the stream is either
paused or playing.
method stop :
This function stops the stream if it was playing or paused, and
does nothing if it was already stopped. It also resets the
playing position (unlike pause()).