  | 
  
    CUGL 1.3
    
   Cornell University Game Library 
   | 
 
 
 
 
   46 #ifndef __CU_SOUND_LOADER_H__ 
   47 #define __CU_SOUND_LOADER_H__ 
   48 #include <cugl/assets/CULoader.h> 
   49 #include <cugl/audio/CUSound.h> 
   79 #pragma mark Asset Loading 
   95     void materialize(
const std::string& key, 
const std::shared_ptr<Sound>& sound,
 
   96                      LoaderCallback callback);
 
  116     virtual bool read(
const std::string& key, 
const std::string& source,
 
  117                       LoaderCallback callback, 
bool async) 
override;
 
  142     virtual bool read(
const std::shared_ptr<JsonValue>& json,
 
  143                       LoaderCallback callback, 
bool async) 
override;
 
  148 #pragma mark Constructors 
  185     static std::shared_ptr<SoundLoader> 
alloc() {
 
  186         std::shared_ptr<SoundLoader> result = std::make_shared<SoundLoader>();
 
  187         return (result->init() ? result : 
nullptr);
 
  204     static std::shared_ptr<SoundLoader> 
alloc(
const std::shared_ptr<ThreadPool>& threads) {
 
  205         std::shared_ptr<SoundLoader> result = std::make_shared<SoundLoader>();
 
  206         return (result->init(threads) ? result : 
nullptr);
 
  210 #pragma mark Properties 
  
void materialize(const std::string &key, const std::shared_ptr< Sound > &sound, LoaderCallback callback)
 
Definition: CULoader.h:749
 
virtual bool read(const std::string &key, const std::string &source, LoaderCallback callback, bool async) override
 
static std::shared_ptr< SoundLoader > alloc(const std::shared_ptr< ThreadPool > &threads)
Definition: CUSoundLoader.h:204
 
std::shared_ptr< ThreadPool > _loader
Definition: CULoader.h:105
 
static std::shared_ptr< SoundLoader > alloc()
Definition: CUSoundLoader.h:185
 
void setVolume(float volume)
Definition: CUSoundLoader.h:229
 
float _volume
Definition: CUSoundLoader.h:77
 
std::unordered_map< std::string, std::shared_ptr< Sound > > _assets
Definition: CULoader.h:752
 
void dispose() override
Definition: CUSoundLoader.h:168
 
Definition: CUSoundLoader.h:70
 
float getVolume() const
Definition: CUSoundLoader.h:219