|
wavelength 1.0.0
|
Stream of sound data read from a file and handed to the sound output a run at a time. More...
#include <streamplayer.h>
Public Member Functions | |
| StreamPlayer (int nChannel, const char *pszFile, bool bAudio) | |
| Open a stream file, or SoundFX/default.str when the file does not open. | |
| ~StreamPlayer () | |
| Close the stream file. | |
| void | Poll () |
| Pass the next run of the file to the sound output, and end the stream once the file ends. | |
| bool | IsFinished () |
| Report whether the file ended and the end of the stream was sent. | |
| void | SetPlaying (bool bPlaying) |
| Set whether the stream plays. | |
| bool | IsPlaying () const |
| Report whether the stream plays. | |
| int | GetChannel () const |
| FileStreamBuffer * | GetBuffer () const |
Stream of sound data read from a file and handed to the sound output a run at a time.
The class is not polymorphic and has no RTTI. The name is inferred. The object is 0x18 bytes. Synth::SetStream() gives the output the stream to play, and the output polls it once a frame.
| StreamPlayer::StreamPlayer | ( | int | nChannel, |
| const char * | pszFile, | ||
| bool | bAudio ) |
Open a stream file, or SoundFX/default.str when the file does not open.
| nChannel | The value recorded first in the object. SongPreview passes 0. |
| pszFile | The stream file. |
| bAudio | Whether the file is one of the audio streams, passed to the file opener. |
| StreamPlayer::~StreamPlayer | ( | ) |
Close the stream file.
| void StreamPlayer::Poll | ( | ) |
Pass the next run of the file to the sound output, and end the stream once the file ends.
The end is sent 40 milliseconds after the last run. A stream that does not play is unchanged. The name is inferred.
| bool StreamPlayer::IsFinished | ( | ) |
Report whether the file ended and the end of the stream was sent.
The name is inferred.
| void StreamPlayer::SetPlaying | ( | bool | bPlaying | ) |
Set whether the stream plays.
The stream clears the flag once it has finished.
| bPlaying | Whether the stream plays. |
| bool StreamPlayer::IsPlaying | ( | ) | const |
Report whether the stream plays.
|
inline |
|
inline |