-
Notifications
You must be signed in to change notification settings - Fork 0
class_audiostream
reduz edited this page Feb 23, 2014
·
10 revisions
Inherits: resource\ Category: Core\
Base class for audio streams.
- void #play(****)
- void #stop(****)
- bool #is_playing(****) const
- void #set_loop( bool enabled )
- bool #has_loop(****) const
- String #get_stream_name(****) const
- int #get_loop_count(****) const
- void #seek_pos( real pos )
- real #get_pos(****) const
- real #get_length(****) const
- int #get_update_mode(****) const
- void #update(****)
- UPDATE_NONE = 0 - Does not need update, or manual polling.
- UPDATE_IDLE = 1 - Stream is updated on the main thread, when idle.
- UPDATE_THREAD = 2 - Stream is updated on its own thread.
Base class for audio streams. Audio streams are used for music"#10;"#9;playback, or other types of streamed sounds that don't fit or"#10;"#9;requiere more flexibility than a sample.
== play ==
- void #play(****) \ Start playback of an audio stream. == stop ==
- void #stop(****) \ Stop playback of an audio stream. == is_playing ==
- bool #is_playing(****) const \ Return wether the audio stream is currently playing. == set_loop ==
- void #set_loop( bool enabled ) \ Set the loop hint for the audio stream playback. if"#10;"#9;"#9;"#9;true, audio stream will attempt to loop (restart)"#10;"#9;"#9;"#9;when finished. == has_loop ==
- bool #has_loop(****) const \ Return wether the audio stream loops. See #set_loop == get_stream_name ==
- String #get_stream_name(****) const \ Return the name of the audio stream. Often the song"#10;"#9;"#9;"#9;title when the stream is music. == get_loop_count ==
- int #get_loop_count(****) const \ Return the amount of times that the stream has"#10;"#9;"#9;"#9;looped (if loop is supported). == seek_pos ==
- void #seek_pos( real pos ) \ Seek to a certain position (in seconds) in an audio"#10;"#9;"#9;"#9;stream. == get_pos ==
- real #get_pos(****) const \ Return the current playing position (in seconds) of the audio"#10;"#9;"#9;"#9;stream (if supported). Since this value is updated"#10;"#9;"#9;"#9;internally, it may not be exact or updated"#10;"#9;"#9;"#9;continuosly. Accuracy depends on the sample buffer"#10;"#9;"#9;"#9;size of the audio driver. == get_update_mode ==
- int #get_update_mode(****) const \ Return the type of update that the stream uses. Some"#10;"#9;"#9;"#9;types of stream may need manual polling. == update ==
- void #update(****) \ Manually poll the audio stream (if it is requested"#10;"#9;"#9;"#9;to).