File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
src/main/java/io/github/dsheirer/audio/playback Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -314,6 +314,28 @@ private void playAudio(ByteBuffer buffer)
314
314
315
315
if (mOutput != null )
316
316
{
317
+ try
318
+ {
319
+ Control gain = mOutput .getControl (FloatControl .Type .MASTER_GAIN );
320
+ mGainControl = (FloatControl ) gain ;
321
+ }
322
+ catch (IllegalArgumentException iae )
323
+ {
324
+ mLog .warn ("Couldn't obtain MASTER GAIN control for stereo line [" +
325
+ mMixer .getMixerInfo ().getName () + " | " + getChannelName () + "]" );
326
+ }
327
+
328
+ try
329
+ {
330
+ Control mute = mOutput .getControl (BooleanControl .Type .MUTE );
331
+ mMuteControl = (BooleanControl ) mute ;
332
+ }
333
+ catch (IllegalArgumentException iae )
334
+ {
335
+ mLog .warn ("Couldn't obtain MUTE control for stereo line [" +
336
+ mMixer .getMixerInfo ().getName () + " | " + getChannelName () + "]" );
337
+ }
338
+
317
339
LOGGING_SUPPRESSOR .info ("reopen audio output success" , 5 ,
318
340
"Closed and reopened audio output - success - mOutput is not null" );
319
341
}
You can’t perform that action at this time.
0 commit comments