+
+ ALuint buffer = load_file_into_buffer(file.get());
+ buffers.insert(std::make_pair(filename, buffer));
+ } catch(std::exception& e) {
+ log_warning << "Error while preloading sound file: " << e.what() << std::endl;
+ }
+}
+
+void
+SoundManager::play(const std::string& filename, const Vector& pos)
+{
+ if(!sound_enabled)
+ return;
+
+ try {
+ std::auto_ptr<OpenALSoundSource> source
+ (intern_create_sound_source(filename));
+