Simulant  21.06-50
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Public Member Functions | Friends | List of all members
smlt::Sound Class Reference
Inheritance diagram for smlt::Sound:
smlt::RefCounted< Sound > smlt::generic::Identifiable< SoundID > smlt::Asset smlt::Loadable smlt::ChainNameable< Sound > smlt::TwoPhaseConstructed smlt::Nameable smlt::Nameable

Public Member Functions

 Sound (SoundID id, AssetManager *asset_manager, SoundDriver *sound_driver)
 
uint32_t sample_rate () const
 
void set_sample_rate (uint32_t rate)
 
AudioDataFormat format ()
 
void set_format (AudioDataFormat format)
 
std::size_t buffer_size () const
 
uint8_t channels () const
 
void set_channels (uint8_t ch)
 
std::shared_ptr< std::istream > & input_stream ()
 
void set_input_stream (std::shared_ptr< std::istream > stream)
 
std::size_t stream_length () const
 
template<typename Func >
void set_playing_sound_init_function (Func &&func)
 
SoundDriver_driver () const
 
- Public Member Functions inherited from smlt::TwoPhaseConstructed
virtual bool init ()
 
virtual void clean_up ()
 
- Public Member Functions inherited from smlt::generic::Identifiable< SoundID >
 Identifiable (SoundID id)
 
SoundID id () const
 
virtual bool operator== (const Identifiable< SoundID > &rhs) const
 
virtual bool operator< (const Identifiable< SoundID > &rhs) const
 
void _bind_id_pointer (ResourceTypePtr ptr)
 
void _overwrite_id (SoundID new_id)
 
- Public Member Functions inherited from smlt::Asset
 Asset (AssetManager *manager)
 
AssetManagerasset_manager ()
 
const AssetManagerasset_manager () const
 
int age () const
 
void set_garbage_collection_method (GarbageCollectMethod method)
 
- Public Member Functions inherited from smlt::Nameable
void set_name (const std::string &name)
 
const std::string & name () const
 
bool has_name () const
 
- Public Member Functions inherited from smlt::ChainNameable< Sound >
Soundset_name_and_get (const std::string &name)
 

Friends

class AudioSource
 
class PlayingSound
 

Additional Inherited Members

- Public Types inherited from smlt::RefCounted< Sound >
typedef std::shared_ptr< Soundptr
 
typedef std::weak_ptr< Soundwptr
 
- Public Types inherited from smlt::generic::Identifiable< SoundID >
typedef SoundID id_type
 
- Static Public Member Functions inherited from smlt::RefCounted< Sound >
static RefCounted< Sound >::ptr create (Args &&... args)
 
static RefCounted< Sound >::ptr create ()
 
- Public Attributes inherited from smlt::Asset
Property< generic::DataCarrier Asset::* > data = {this, &Asset::data_}
 
- Protected Member Functions inherited from smlt::RefCounted< Sound >
 RefCounted (Args &&...)
 
- Protected Member Functions inherited from smlt::Asset
 Asset (const Asset &rhs)
 
Assetoperator= (const Asset &rhs)
 

The documentation for this class was generated from the following files: