diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-12-09 23:06:51 +0100 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-12-09 23:06:51 +0100 |
commit | 35d788cff5074475c210c8f434e4671089ae4d2f (patch) | |
tree | 575af3e720b259793cad0939ebb14c58291742bb /servers/audio/audio_stream.cpp | |
parent | 907298d673723d7d957c382647dedde66c29ecd2 (diff) |
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.
Diffstat (limited to 'servers/audio/audio_stream.cpp')
-rw-r--r-- | servers/audio/audio_stream.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<AudioStreamPlayback> 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; } |