-
Notifications
You must be signed in to change notification settings - Fork 0
class_audiostream
####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.
- void
play( )
Start playback of an audio stream.
- void
stop( )
Stop playback of an audio stream.
-
bool
is_playing( ) const
Return wether the audio stream is currently playing.
- 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.
-
bool
has_loop( ) const
Return wether the audio stream loops. See set_loop
-
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.
-
int
get_loop_count( ) const
Return the amount of times that the stream has"#10;"#9;"#9;"#9;looped (if loop is supported).
- void
seek_pos( real pos )
Seek to a certain position (in seconds) in an audio"#10;"#9;"#9;"#9;stream.
-
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.
-
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.
- void
update( )
Manually poll the audio stream (if it is requested"#10;"#9;"#9;"#9;to).