mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-14 17:47:32 -05:00
Co-authored-by: Denny <denny@denny-desktop>
This commit is contained in:
@@ -81,15 +81,23 @@ public class AudioPlaybackManager implements Listener<AudioSegment>, IAudioContr
|
|||||||
MyEventBus.getEventBus().register(this);
|
MyEventBus.getEventBus().register(this);
|
||||||
|
|
||||||
MixerChannelConfiguration configuration = mUserPreferences.getPlaybackPreference().getMixerChannelConfiguration();
|
MixerChannelConfiguration configuration = mUserPreferences.getPlaybackPreference().getMixerChannelConfiguration();
|
||||||
try
|
|
||||||
|
if(configuration != null)
|
||||||
{
|
{
|
||||||
setMixerChannelConfiguration(configuration);
|
try
|
||||||
|
{
|
||||||
|
setMixerChannelConfiguration(configuration);
|
||||||
|
}
|
||||||
|
catch(AudioException ae)
|
||||||
|
{
|
||||||
|
mLog.error("Error during setup of audio playback configuration. Attempted to use audio mixer [" +
|
||||||
|
(configuration != null ? configuration.getMixer().toString() : "null") + "] and channel [" +
|
||||||
|
(configuration != null ? configuration.getMixerChannel().name() : "null") + "]", ae);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch(AudioException ae)
|
else
|
||||||
{
|
{
|
||||||
mLog.error("Error during setup of audio playback configuration. Attempted to use audio mixer [" +
|
mLog.warn("No audio output devices available");
|
||||||
(configuration != null ? configuration.getMixer().toString() : "null") + "] and channel [" +
|
|
||||||
(configuration != null ? configuration.getMixerChannel().name() : "null") + "]", ae);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -350,19 +350,26 @@ public class PlaybackPreference extends Preference
|
|||||||
{
|
{
|
||||||
MixerChannelConfiguration defaultConfig = MixerManager.getDefaultOutputMixer();
|
MixerChannelConfiguration defaultConfig = MixerManager.getDefaultOutputMixer();
|
||||||
|
|
||||||
String configName = mPreferences.get(PREFERENCE_KEY_MIXER_CHANNEL_CONFIG, defaultConfig.toString());
|
if(defaultConfig != null)
|
||||||
|
|
||||||
for(MixerChannelConfiguration config: MixerManager.getOutputMixers())
|
|
||||||
{
|
{
|
||||||
if(config.toString().contentEquals(configName))
|
String configName = mPreferences.get(PREFERENCE_KEY_MIXER_CHANNEL_CONFIG, defaultConfig.toString());
|
||||||
|
|
||||||
|
for(MixerChannelConfiguration config: MixerManager.getOutputMixers())
|
||||||
{
|
{
|
||||||
mMixerChannelConfiguration = config;
|
if(config.toString().contentEquals(configName))
|
||||||
|
{
|
||||||
|
mMixerChannelConfiguration = config;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(mMixerChannelConfiguration == null)
|
||||||
|
{
|
||||||
|
mMixerChannelConfiguration = defaultConfig;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if(mMixerChannelConfiguration == null)
|
|
||||||
{
|
{
|
||||||
mMixerChannelConfiguration = defaultConfig;
|
mLog.error("Error - no system audio devices available");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,6 +105,19 @@ public class AudioRecordingManager implements Listener<AudioSegment>
|
|||||||
*/
|
*/
|
||||||
public void processCompletedAudioSegment(AudioSegment audioSegment)
|
public void processCompletedAudioSegment(AudioSegment audioSegment)
|
||||||
{
|
{
|
||||||
|
//Debug
|
||||||
|
if(audioSegment.getAudioBufferCount() == 0)
|
||||||
|
{
|
||||||
|
mLog.debug("Audio Segment detected with 0 audio buffers");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Identifier> toIdentifiers = audioSegment.getIdentifierCollection().getIdentifiers(Role.TO);
|
||||||
|
|
||||||
|
if(toIdentifiers.isEmpty())
|
||||||
|
{
|
||||||
|
mLog.debug("Audio Segment detected with NO TO identifiers");
|
||||||
|
}
|
||||||
|
|
||||||
if(audioSegment.recordAudioProperty().get())
|
if(audioSegment.recordAudioProperty().get())
|
||||||
{
|
{
|
||||||
mCompletedAudioSegmentQueue.add(audioSegment);
|
mCompletedAudioSegmentQueue.add(audioSegment);
|
||||||
|
|||||||
Reference in New Issue
Block a user