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.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to