Commit 38adb804 authored by Georg Schaefer's avatar Georg Schaefer
Browse files

fix crash caused by calling Mix_FadeOutChannel with 0 as the second parameter

parent fac009c0
......@@ -91,7 +91,6 @@ namespace gdw {
if (!sound_ptr) {
log(log_level::error) << "no sound " << name << " found in audio collection" << std::endl;
}
int channel = Mix_PlayChannel(-1, sound_ptr->get(), loop);
if (channel < 0) {
audio_error("couldn't play sound");
......@@ -104,7 +103,7 @@ namespace gdw {
if(channel < -1) {
return;
}
Mix_FadeOutChannel(channel, fade_out);
Mix_FadeOutChannel(channel, fade_out + 1);
}
void audio::stereo(int channel, int left, int right) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment