Changeset 2967 for code/branches
- Timestamp:
- May 11, 2009, 3:29:23 PM (16 years ago)
- Location:
- code/branches/sound/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sound/src/CMakeLists.txt
r2930 r2967 141 141 ADD_SUBDIRECTORY(util) 142 142 ADD_SUBDIRECTORY(core) 143 ADD_SUBDIRECTORY(sound)144 143 ADD_SUBDIRECTORY(network) 145 144 ADD_SUBDIRECTORY(orxonox) -
code/branches/sound/src/orxonox/CMakeLists.txt
r2966 r2967 54 54 ${OPENAL_LIBRARY} 55 55 ${ALUT_LIBRARY} 56 #${VORBISFILE_LIBRARY}57 #${VORBIS_LIBRARY}58 #${OGG_LIBRARY}56 ${VORBISFILE_LIBRARY} 57 ${VORBIS_LIBRARY} 58 ${OGG_LIBRARY} 59 59 ogreceguirenderer_orxonox 60 60 tinyxml++_orxonox -
code/branches/sound/src/orxonox/sound/SoundBase.cc
r2966 r2967 26 26 * 27 27 */ 28 #include <AL/alut.h> 29 #include <vorbis/vorbisfile.h> 28 30 29 31 #include "orxonox/objects/worldentities/WorldEntity.h" … … 128 130 129 131 bool SoundBase::loadFile(std::string filename) { 132 filename = Core::getMediaPathString() + "/audio/" + filename; 130 133 COUT(3) << "OpenAL ALUT: loading file " << filename << std::endl; 131 134 this->buffer_ = alutCreateBufferFromFile(filename.c_str()); 132 135 if(this->buffer_ == AL_NONE) { 133 136 COUT(2) << "OpenAL ALUT: " << alutGetErrorString(alutGetError()) << std::endl; 134 return false; 137 if(filename.find("ogg", 0) != string::npos) 138 { 139 this->buffer_ = loadOggFile(filename); 140 } 141 142 if(this->buffer_ == AL_NONE) 143 return false; 135 144 } 136 145 … … 149 158 return state; 150 159 } 160 161 ALuint SoundBase::loadOggFile(std::string filename) 162 { 163 // just a dummy 164 return AL_NONE; 165 } 151 166 } // namespace: orxonox -
code/branches/sound/src/orxonox/sound/SoundBase.h
r2966 r2967 30 30 31 31 #include <AL/al.h> 32 #include <AL/alut.h>33 32 #include <string> 34 33 … … 62 61 63 62 private: 63 ALuint loadOggFile(std::string filename); 64 64 ALuint source_; 65 65 ALuint buffer_;
Note: See TracChangeset
for help on using the changeset viewer.