projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switched magnification to percentage, added black-border as alternative to scale
[supertux.git]
/
src
/
audio
/
sound_manager.cpp
diff --git
a/src/audio/sound_manager.cpp
b/src/audio/sound_manager.cpp
index
2e83630
..
b2697c1
100644
(file)
--- a/
src/audio/sound_manager.cpp
+++ b/
src/audio/sound_manager.cpp
@@
-126,7
+126,7
@@
OpenALSoundSource*
SoundManager::intern_create_sound_source(const std::string& filename)
{
if(!sound_enabled)
SoundManager::intern_create_sound_source(const std::string& filename)
{
if(!sound_enabled)
- throw
new std::exception
("sound disabled");
+ throw
std::runtime_error
("sound disabled");
std::auto_ptr<OpenALSoundSource> source (new OpenALSoundSource());
std::auto_ptr<OpenALSoundSource> source (new OpenALSoundSource());
@@
-139,7
+139,7
@@
SoundManager::intern_create_sound_source(const std::string& filename)
} else {
// Load sound file
std::auto_ptr<SoundFile> file (load_sound_file(filename));
} else {
// Load sound file
std::auto_ptr<SoundFile> file (load_sound_file(filename));
-
+
if(file->size < 100000) {
buffer = load_file_into_buffer(file.get());
buffers.insert(std::make_pair(filename, buffer));
if(file->size < 100000) {
buffer = load_file_into_buffer(file.get());
buffers.insert(std::make_pair(filename, buffer));
@@
-148,6
+148,8
@@
SoundManager::intern_create_sound_source(const std::string& filename)
source->set_sound_file(file.release());
return source;
}
source->set_sound_file(file.release());
return source;
}
+
+ log_debug << "Uncached sound \"" << filename << "\" requested to be played" << std::endl;
}
alSourcei(source->source, AL_BUFFER, buffer);
}
alSourcei(source->source, AL_BUFFER, buffer);
@@
-159,7
+161,7
@@
SoundManager::create_sound_source(const std::string& filename)
{
if(!sound_enabled)
return create_dummy_sound_source();
{
if(!sound_enabled)
return create_dummy_sound_source();
-
+
try {
return intern_create_sound_source(filename);
} catch(std::exception &e) {
try {
return intern_create_sound_source(filename);
} catch(std::exception &e) {