From 2fc638bf8df7cf0d7554d7bb9700c4662c7fc816 Mon Sep 17 00:00:00 2001 From: Dennis Sheirer Date: Fri, 18 Oct 2024 02:57:20 -0400 Subject: [PATCH] #2032 Audio output suppresses logging after 5 times when app can't get gain or mute controls for current audio output. --- .../io/github/dsheirer/audio/playback/AudioOutput.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/github/dsheirer/audio/playback/AudioOutput.java b/src/main/java/io/github/dsheirer/audio/playback/AudioOutput.java index d383c4129..5f8df9168 100644 --- a/src/main/java/io/github/dsheirer/audio/playback/AudioOutput.java +++ b/src/main/java/io/github/dsheirer/audio/playback/AudioOutput.java @@ -140,8 +140,9 @@ public AudioOutput(Mixer mixer, MixerChannel mixerChannel, AudioFormat audioForm } catch(IllegalArgumentException iae) { - mLog.warn("Couldn't obtain MASTER GAIN control for stereo line [" + - mixer.getMixerInfo().getName() + " | " + getChannelName() + "]"); + LOGGING_SUPPRESSOR.error("no gain control", 5, "Couldn't obtain " + + "MASTER GAIN control for stereo line [" + mixer.getMixerInfo().getName() + " | " + + getChannelName() + "]"); } try @@ -151,8 +152,9 @@ public AudioOutput(Mixer mixer, MixerChannel mixerChannel, AudioFormat audioForm } catch(IllegalArgumentException iae) { - mLog.warn("Couldn't obtain MUTE control for stereo line [" + - mixer.getMixerInfo().getName() + " | " + getChannelName() + "]"); + LOGGING_SUPPRESSOR.error("no mute control", 5, "Couldn't obtain " + + "MUTE control for stereo line [" + mixer.getMixerInfo().getName() + " | " + + getChannelName() + "]"); } //Run the queue processor task every 100 milliseconds or 10 times a second