diff --git a/src/audio/AudioManager.java b/src/audio/AudioManager.java index 6be25898..02578da0 100644 --- a/src/audio/AudioManager.java +++ b/src/audio/AudioManager.java @@ -118,12 +118,11 @@ public class AudioManager implements Listener, IAudioController try { - setMixerChannelConfiguration(configuration); + setMixerChannelConfiguration(configuration, false); } catch(Exception e) { - mLog.error("Couldn't set stored audio mixer/channel configuration" - + " - using default", e); + mLog.error("Couldn't set stored audio mixer/channel configuration - using default", e); try { @@ -131,8 +130,7 @@ public class AudioManager implements Listener, IAudioController } catch(Exception e2) { - mLog.error("Couldn't set default audio mixer/channel " - + "configuration - no audio will be available", e2); + mLog.error("Couldn't set default audio mixer/channel configuration - no audio will be available", e2); } } } @@ -217,8 +215,12 @@ public class AudioManager implements Listener, IAudioController @Override public void setMixerChannelConfiguration(MixerChannelConfiguration entry) throws AudioException { - if(entry != null && - (entry.getMixerChannel() == MixerChannel.MONO || entry.getMixerChannel() == MixerChannel.STEREO)) + setMixerChannelConfiguration(entry, true); + } + + public void setMixerChannelConfiguration(MixerChannelConfiguration entry, boolean saveSettings) throws AudioException + { + if(entry != null && (entry.getMixerChannel() == MixerChannel.MONO || entry.getMixerChannel() == MixerChannel.STEREO)) { mControllerBroadcaster.broadcast(CONFIGURATION_CHANGE_STARTED); @@ -260,11 +262,12 @@ public class AudioManager implements Listener, IAudioController mControllerBroadcaster.broadcast(CONFIGURATION_CHANGE_COMPLETE); - SystemProperties properties = SystemProperties.getInstance(); - - properties.set(AUDIO_MIXER_PROPERTY, entry.getMixer().getMixerInfo().getName()); - properties.set(AUDIO_CHANNELS_PROPERTY, entry.getMixerChannel().name()); - properties.save(); + if(saveSettings) + { + SystemProperties properties = SystemProperties.getInstance(); + properties.set(AUDIO_MIXER_PROPERTY, entry.getMixer().getMixerInfo().getName()); + properties.set(AUDIO_CHANNELS_PROPERTY, entry.getMixerChannel().name()); + } } } diff --git a/src/audio/broadcast/BroadcastModel.java b/src/audio/broadcast/BroadcastModel.java index f6e9b587..ad79cf9a 100644 --- a/src/audio/broadcast/BroadcastModel.java +++ b/src/audio/broadcast/BroadcastModel.java @@ -585,7 +585,7 @@ public class BroadcastModel extends AbstractTableModel implements Listener