diff options
Diffstat (limited to 'src/sound_openal.cpp')
-rw-r--r-- | src/sound_openal.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/sound_openal.cpp b/src/sound_openal.cpp index 6f9ff3bd6..f7bce6546 100644 --- a/src/sound_openal.cpp +++ b/src/sound_openal.cpp @@ -286,22 +286,6 @@ public: return bufs[j]; } - bool loadSound(const std::string &name, - const std::string &filepath) - { - SoundBuffer *buf = loadOggFile(filepath); - if(buf) - addBuffer(name, buf); - return false; - } - bool loadSound(const std::string &name, - const std::vector<char> &filedata) - { - errorstream<<"OpenALSoundManager: Loading from filedata not" - " implemented"<<std::endl; - return false; - } - PlayingSound* createPlayingSound(SoundBuffer *buf, bool loop, float volume) { @@ -392,15 +376,15 @@ public: if(!m_fetcher) return NULL; std::set<std::string> paths; - std::set<std::vector<char> > datas; + std::set<std::string> datas; m_fetcher->fetchSounds(name, paths, datas); for(std::set<std::string>::iterator i = paths.begin(); i != paths.end(); i++){ - loadSound(name, *i); + loadSoundFile(name, *i); } - for(std::set<std::vector<char> >::iterator i = datas.begin(); + for(std::set<std::string>::iterator i = datas.begin(); i != datas.end(); i++){ - loadSound(name, *i); + loadSoundData(name, *i); } return getBuffer(name); } @@ -439,6 +423,22 @@ public: /* Interface */ + bool loadSoundFile(const std::string &name, + const std::string &filepath) + { + SoundBuffer *buf = loadOggFile(filepath); + if(buf) + addBuffer(name, buf); + return false; + } + bool loadSoundData(const std::string &name, + const std::string &filedata) + { + errorstream<<"OpenALSoundManager: Loading from filedata not" + " implemented"<<std::endl; + return false; + } + void updateListener(v3f pos, v3f vel, v3f at, v3f up) { m_listener_pos = pos; |