#include <sdlpp_sound.h>
Classes | |
struct | Data |
Public Member Functions | |
SoundStream (const xstring &filename="") | |
SoundStream (std::istream *is) | |
SoundStream (ResourceFile &rf, const xstring &name) | |
SoundStream (const SoundStream &rhs) | |
SoundStream & | operator= (const SoundStream &rhs) |
void | play () |
void | stop () |
Protected Member Functions | |
void | destroy () |
virtual Uint8 * | get_frame (int bytes) |
Friends | |
class | SoundManager |
struct | SoundStream_Thread |
SoundStream is usually used for music or other long (potential infinite) audio. It can either be decoded from some compressed audio source, or retrieved from a network location. The stream can only have a single instance playing at any given moment, though it is possible to create multiple streams from the same source of data. SoundStream objects in their nature allocate memory and resources. In order to make their usage simple and still not waste resources by duplicating memory, SoundStream objects include built in reference counting, so they can be passed by value on the stack without too much overhead.
SDLPP::SoundStream::SoundStream | ( | const xstring & | filename = "" |
) |
Construct a sound stream and optionally load it from a file.
SDLPP::SoundStream::SoundStream | ( | std::istream * | is | ) |
Construct a sound Stream by decoding audio from an input stream.
SDLPP::SoundStream::SoundStream | ( | ResourceFile & | rf, | |
const xstring & | name | |||
) |
Construct a sound Stream by decoding audio from resource file.
void SDLPP::SoundStream::play | ( | ) |
Start playback of this sound stream.
void SDLPP::SoundStream::stop | ( | ) |
Stop playback of this stream