19 bool AudioSample::s_alAddonInitialized =
false;
23 if (!s_alAddonInitialized)
26 al_init_acodec_addon();
27 s_alAddonInitialized =
true;
33 al_destroy_sample(m_pSample);
41 ALLEGRO_SAMPLE* pTemp = al_load_sample(path.c_str());
50 return al_play_sample(m_pSample, m_volume, 0, 1, m_playMode, NULL);
55 m_playMode = loop ? ALLEGRO_PLAYMODE_LOOP : ALLEGRO_PLAYMODE_ONCE;
virtual bool Load(const std::string &path, ResourceManager *pManager)
Load the desired font into memory.
virtual void SetSample(ALLEGRO_SAMPLE *pSample)
virtual void SetVolume(const float volume)
virtual void SetLooping(const bool loop=true)
static T Clamp(const T min, const T max, const T value)
Restricts a value to be within a specified range.
Loads and manages the lifespan of objects from external files.
Katana Engine is a library of classes, interfaces, and value types that provides a foundation for dev...