widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #09301
Re: [Merge] lp:~widelands-dev/widelands/sound_improvements into lp:widelands
Thanks for the review. I am merging this now and wait if anybody complains about the high number of sound parallel sound effects.
I just had the idea that we could make sound effects less loud the higher zoomed out we are. An idea for another day.
@bunnybot merge
Diff comments:
> === modified file 'src/sound/sound_handler.cc'
> --- src/sound/sound_handler.cc 2016-10-22 18:19:22 +0000
> +++ src/sound/sound_handler.cc 2017-01-03 20:52:54 +0000
> @@ -129,6 +130,10 @@
> return;
> }
>
> + if (Mix_AllocateChannels(kNumMixingChannels) != kNumMixingChannels) {
That is the c pattern to check for an error and is used a lot in this file. Pulling it out into a variable gets awkwards with many calls in a row (as in this function):
const int error_1 = func(); if (error_1 != 0)...
const int error_2 = func1(); ....
So I opted to keep it.
> + initialization_error(Mix_GetError());
> + }
> +
> Mix_HookMusicFinished(SoundHandler::music_finished_callback);
> Mix_ChannelFinished(SoundHandler::fx_finished_callback);
> load_system_sounds();
--
https://code.launchpad.net/~widelands-dev/widelands/sound_improvements/+merge/314035
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/sound_improvements.
References