An AudioStream object represents a source of audio signal and can be created by calling the Audio.asyncLoadAudioStream() function. However, it does not play audio on its own. To play it, you must also create an AudioTrack object using the "asyncAddTrack" method of a target AudioPlayer object.
During playback of an AudioStream through an AudioTrack object, any alterations made to the AudioStream object are immediately reflected in real-time. This allows you to adjust parameters such as volume, pause, and audio position using the pertinent AudioStream object properties and methods while the AudioTrack is actively playing.
Propriedade |
Tipo |
Descrição |
enabled |
Boolean |
Indicates whether the AudioStream can output audio signal. If the AudioStream is being played by an AudioTrack, setting this attribute to false will pause the playback, as no audio signal will be outputted. Setting it back to true will resume the playback. Default: True |
eof |
Boolean |
(Read-only) Indicates whether the AudioStream has reached its EOF (end of file). |
length |
Float |
(Read-only) If the duration of the audio is known, this attribute contains its duration in seconds; otherwise, it is set to nil. Remarks:
|
position |
Float |
If the current audio stream is seekable and its position is defined, this contains the stream position in seconds; otherwise, it is set to nil. Remarks:
|
volume |
Float |
A numerical value representing the output volume level of the audio signal from the AudioStream. This value acts as a multiplication factor, with 0.0 indicating complete silence, and 2.0 indicating twice the original audio volume. The default value is 1.0 |
Método |
Descrição |
audioStream:setPosition(newPosition) |
Seeks the audio stream to a specified position. Arguments:
Return:
Remarks:
|
Sets up a monitoring that waits for the AudioStream to reach its end of file (EOF). Arguments: None Return:
Remarks:
|
Nome do evento |
Descrição |
onEOF |
This event is triggered by Firecast when the AudioStream reaches its end of file (EOF). |
Created with the Personal Edition of HelpNDoc: Easily create Help documents