HomeWildfire Games

Play a sound when there are no idle entities.

Description

Play a sound when there are no idle entities.

If there are no idle units and the idle-unit hotkey is pressed there is now a sound played.
Beneficial when there are already units selected since selection doesn't change.

Sound courtesy of @Samualis.

Refs. #5360
Based on a patch by: @cpc
Differential revision: https://code.wildfiregames.com/D1692
Comments by: @asterix, @smiley, @Stan, @vladislavbelov

Event Timeline

Langbart added a subscriber: Langbart.EditedApr 18 2021, 11:14 AM

With the "default settings" I could hardly hear the sound, after lowering the "music volume" and increasing the "action volume" to max the sound is better noticeable.
After increasing the sound with ffmpeg (ffmpeg.org/ffmpeg-filters.html#volume) by a factor of 8, it is now better noticeable with the "default settings".

ffmpeg -i alarm_no_idle_unit_01.ogg  -af 'volume=8' alarm_no_idle_unit_01.ogg

8x
Original

Stan added inline comments.Apr 20 2021, 6:06 PM
/ps/trunk/binaries/data/mods/public/audio/interface/alarm/alarm_no_idle_unit.xml
5

@Langbart can you play with this instead and report back?

[10:29:32] <elexis1> (16:33:07) elexis: https://trac.wildfiregames.com/changeset/25287
[10:29:32] <elexis1> (16:33:29) elexis: why the new function PlaySoundForPlayer, it isnt the first time that we need to play a sound for the GUI 
[10:29:40] <elexis1> (16:35:34) elexis: common/functions_utility.js:  Engine.PlayUISound(notificationType.soundfile, false);
[10:30:20] <elexis1> session/input.js: Engine.PlayUISound(g_FlareSound, false);