Classes | |
class | clan::SoundProvider_Raw |
Sound provider in a raw PCM format (no header in file). More... | |
class | clan::SoundProvider_Wave |
Windows WAVE sample format (.wav) sound provider. More... | |
class | clan::SoundProviderFactory |
Sound Provider Factor class. More... | |
class | clan::SoundProviderType |
Sound provider type. More... | |
class | clan::SoundProviderType_Register< SoundProviderClass > |
Class template to register a sound provider type. More... | |
Operations | |
static SoundProvider * | clan::SoundProviderFactory::load (const std::string &filename, bool streamed, const FileSystem &fs, const std::string &type=std::string()) |
Loads an sample file from 'filename', using the provider identified by 'type'. More... | |
static SoundProvider * | clan::SoundProviderFactory::load (const std::string &fullname, bool streamed, const std::string &type=std::string()) |
Loads an sample file from 'filename', using the provider identified by 'type'. More... | |
static SoundProvider * | clan::SoundProviderFactory::load (IODevice &file, bool streamed, const std::string &type) |
Loads an sample file from 'file', using the provider identified by 'type'. More... | |
Construction | |
clan::SoundProvider_Raw::SoundProvider_Raw (void *sound_data, int num_samples, int bytes_per_sample, bool stereo, int frequency=22050) | |
Constructs a sound provider based on some raw PCM data. More... | |
virtual | clan::SoundProvider_Raw::~SoundProvider_Raw () |
Operations | |
virtual SoundProvider_Session * | clan::SoundProvider_Raw::begin_session () override |
Called by SoundBuffer when a new session starts. More... | |
virtual void | clan::SoundProvider_Raw::end_session (SoundProvider_Session *session) override |
Called by SoundBuffer when a session has finished. After this call,. More... | |
Implementation | |
class | clan::SoundProvider_Raw::SoundProvider_Raw_Session |
Construction | |
clan::SoundProviderType::SoundProviderType (const std::string &type) | |
Registers a sound provider type in the SoundProviderFactory. More... | |
virtual | clan::SoundProviderType::~SoundProviderType () |
Unregisters a sound provider type in the SoundProviderFactory. More... | |
Operations | |
virtual SoundProvider * | clan::SoundProviderType::load (const std::string &filename, bool streamed, const FileSystem &file_system)=0 |
Called to load with this sound provider type. More... | |
virtual SoundProvider * | clan::SoundProviderType::load (IODevice &file, bool streamed)=0 |
Construction | |
clan::SoundProviderType_Register< SoundProviderClass >::SoundProviderType_Register (const std::string &type) | |
Registers sound provider type in the SoundProviderFactory. More... | |
Operations | |
virtual SoundProvider * | clan::SoundProviderType_Register< SoundProviderClass >::load (const std::string &filename, bool stream, const FileSystem &fs) override |
Called to load static with this sound provider type. More... | |
virtual SoundProvider * | clan::SoundProviderType_Register< SoundProviderClass >::load (IODevice &file, bool stream) override |
Called to load static with this sound provider type. More... | |
Construction | |
clan::SoundProvider_Wave::SoundProvider_Wave (const std::string &filename, const FileSystem &fs, bool stream=false) | |
Constructs a sound provider based on a Windows wave (.wav) file. More... | |
clan::SoundProvider_Wave::SoundProvider_Wave (const std::string &fullname, bool stream=false) | |
clan::SoundProvider_Wave::SoundProvider_Wave (IODevice &file, bool stream=false) | |
virtual | clan::SoundProvider_Wave::~SoundProvider_Wave () |
Operations | |
virtual SoundProvider_Session * | clan::SoundProvider_Wave::begin_session () override |
Called by SoundBuffer when a new session starts. More... | |
virtual void | clan::SoundProvider_Wave::end_session (SoundProvider_Session *session) override |
Called by SoundBuffer when a session has finished. After this call,. More... | |
Implementation | |
class | clan::SoundProvider_Wave::SoundProvider_Wave_Session |
clan::SoundProvider_Raw::SoundProvider_Raw | ( | void * | sound_data, |
int | num_samples, | ||
int | bytes_per_sample, | ||
bool | stereo, | ||
int | frequency = 22050 |
||
) |
Constructs a sound provider based on some raw PCM data.
sound_data | Raw PCM data. |
num_samples | Number of samples to be read out of sound_data. |
bytes_per_sample | The size of a sample in bytes. This is 2 for 16 bit (signed), and 1 for 8 bit (unsigned). |
stereo | True if sound is stereo (two channels). |
frequency | Playback frequency for sample data. |
clan::SoundProvider_Wave::SoundProvider_Wave | ( | const std::string & | filename, |
const FileSystem & | fs, | ||
bool | stream = false |
||
) |
Constructs a sound provider based on a Windows wave (.wav) file.
filename | Filename of wave file. |
provider | Input source provider used to retrieve wave file. |
stream | If true, will stream from disk. If false, will load it to memory. |
clan::SoundProvider_Wave::SoundProvider_Wave | ( | const std::string & | fullname, |
bool | stream = false |
||
) |
clan::SoundProvider_Wave::SoundProvider_Wave | ( | IODevice & | file, |
bool | stream = false |
||
) |
clan::SoundProviderType::SoundProviderType | ( | const std::string & | type | ) |
Registers a sound provider type in the SoundProviderFactory.
|
inline |
Registers sound provider type in the SoundProviderFactory.
|
virtual |
|
virtual |
|
virtual |
Unregisters a sound provider type in the SoundProviderFactory.
|
overridevirtual |
Called by SoundBuffer when a new session starts.
Implements clan::SoundProvider.
|
overridevirtual |
Called by SoundBuffer when a new session starts.
Implements clan::SoundProvider.
|
overridevirtual |
Called by SoundBuffer when a session has finished. After this call,.
SoundBuffer will not access the session anymore. It can safely be deleted here (and in most cases should be delete here).
Implements clan::SoundProvider.
|
overridevirtual |
Called by SoundBuffer when a session has finished. After this call,.
SoundBuffer will not access the session anymore. It can safely be deleted here (and in most cases should be delete here).
Implements clan::SoundProvider.
|
inlineoverridevirtual |
Called to load static with this sound provider type.
Implements clan::SoundProviderType.
|
pure virtual |
Called to load with this sound provider type.
Implemented in clan::SoundProviderType_Register< SoundProviderClass >.
|
static |
Loads an sample file from 'filename', using the provider identified by 'type'.
If the type is an empty string, it uses the extension of the filename to determine what type it is.
The input provider will be used as a the source for filename, if specified.
|
static |
Loads an sample file from 'filename', using the provider identified by 'type'.
|
inlineoverridevirtual |
Called to load static with this sound provider type.
Implements clan::SoundProviderType.
|
pure virtual |
Implemented in clan::SoundProviderType_Register< SoundProviderClass >.
|
static |
Loads an sample file from 'file', using the provider identified by 'type'.
|
friend |
|
friend |