From 35d788cff5074475c210c8f434e4671089ae4d2f Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 9 Dec 2022 23:06:51 +0100 Subject: Remove warning when playing random no-repeat sound with only 1 sound in pool This makes setting up sounds for random pitch/volume faster, as you don't have to change the mode from Random (Avoid Repeats) to Random anymore if you only care about randomizing pitch/volume but want to prevent a warning message from appearing on every playback. --- servers/audio/audio_stream.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'servers/audio') diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp index 4b68515e18..113e728106 100644 --- a/servers/audio/audio_stream.cpp +++ b/servers/audio/audio_stream.cpp @@ -555,8 +555,9 @@ Ref AudioStreamRandomizer::instance_playback_no_repeats() { } } if (local_pool.is_empty()) { + // There is only one sound to choose from. + // Always play a random sound while allowing repeats (which always plays the same sound). playback = instance_playback_random(); - WARN_PRINT("Playback stream pool is too small to prevent repeats."); return playback; } -- cgit v1.2.3