From 1cac1de3b27c5c6a511bf86bd9cb1d763c5c7d5d Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 25 Mar 2012 14:47:51 +0300 Subject: Almost support loading sounds from server --- src/sound_openal.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/sound_openal.cpp') 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 &filedata) - { - errorstream<<"OpenALSoundManager: Loading from filedata not" - " implemented"< paths; - std::set > datas; + std::set datas; m_fetcher->fetchSounds(name, paths, datas); for(std::set::iterator i = paths.begin(); i != paths.end(); i++){ - loadSound(name, *i); + loadSoundFile(name, *i); } - for(std::set >::iterator i = datas.begin(); + for(std::set::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"<