mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-16 10:37:26 -05:00
Merges master onto development branch
This commit is contained in:
@@ -73,6 +73,7 @@ public class AudioManager implements Listener<AudioPacket>, IAudioController
|
|||||||
|
|
||||||
private ThreadPoolManager mThreadPoolManager;
|
private ThreadPoolManager mThreadPoolManager;
|
||||||
private ScheduledFuture<?> mProcessingTask;
|
private ScheduledFuture<?> mProcessingTask;
|
||||||
|
private MixerManager mMixerManager;
|
||||||
|
|
||||||
private MixerChannelConfiguration mMixerChannelConfiguration;
|
private MixerChannelConfiguration mMixerChannelConfiguration;
|
||||||
|
|
||||||
@@ -81,9 +82,10 @@ public class AudioManager implements Listener<AudioPacket>, IAudioController
|
|||||||
* packets to any combination of outputs based on any alias audio routing
|
* packets to any combination of outputs based on any alias audio routing
|
||||||
* options specified by the user.
|
* options specified by the user.
|
||||||
*/
|
*/
|
||||||
public AudioManager( ThreadPoolManager manager )
|
public AudioManager( ThreadPoolManager manager, MixerManager mixerManager )
|
||||||
{
|
{
|
||||||
mThreadPoolManager = manager;
|
mThreadPoolManager = manager;
|
||||||
|
mMixerManager = mixerManager;
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
}
|
}
|
||||||
@@ -100,8 +102,7 @@ public class AudioManager implements Listener<AudioPacket>, IAudioController
|
|||||||
|
|
||||||
String channels = properties.get( AUDIO_CHANNELS_PROPERTY, MixerChannel.MONO.name() );
|
String channels = properties.get( AUDIO_CHANNELS_PROPERTY, MixerChannel.MONO.name() );
|
||||||
|
|
||||||
MixerChannelConfiguration[] mixerConfigurations =
|
MixerChannelConfiguration[] mixerConfigurations = mMixerManager.getOutputMixers();
|
||||||
MixerManager.getInstance().getOutputMixers();
|
|
||||||
|
|
||||||
for( MixerChannelConfiguration mixerConfig: mixerConfigurations )
|
for( MixerChannelConfiguration mixerConfig: mixerConfigurations )
|
||||||
{
|
{
|
||||||
@@ -295,6 +296,29 @@ public class AudioManager implements Listener<AudioPacket>, IAudioController
|
|||||||
mLowestPriorityConnection = null;
|
mLowestPriorityConnection = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears all channel assignments and terminates all audio outputs in
|
||||||
|
* preparation for complete shutdown or change to another mixer/channel
|
||||||
|
* configuration
|
||||||
|
*/
|
||||||
|
private void disposeCurrentConfiguration()
|
||||||
|
{
|
||||||
|
mChannelConnectionMap.clear();
|
||||||
|
|
||||||
|
for( AudioOutputConnection connection : mAudioOutputConnections )
|
||||||
|
{
|
||||||
|
connection.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
mAvailableConnectionCount = 0;
|
||||||
|
|
||||||
|
mAudioOutputConnections.clear();
|
||||||
|
|
||||||
|
mAudioOutputMap.clear();
|
||||||
|
|
||||||
|
mLowestPriorityConnection = null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MixerChannelConfiguration getMixerChannelConfiguration() throws AudioException
|
public MixerChannelConfiguration getMixerChannelConfiguration() throws AudioException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ public class SDRTrunk
|
|||||||
AliasActionManager aliasActionManager = new AliasActionManager( threadPoolManager );
|
AliasActionManager aliasActionManager = new AliasActionManager( threadPoolManager );
|
||||||
channelProcessingManager.addMessageListener( aliasActionManager );
|
channelProcessingManager.addMessageListener( aliasActionManager );
|
||||||
|
|
||||||
AudioManager audioManager = new AudioManager( threadPoolManager );
|
AudioManager audioManager = new AudioManager( threadPoolManager, sourceManager.getMixerManager() );
|
||||||
channelProcessingManager.addAudioPacketListener( audioManager );
|
channelProcessingManager.addAudioPacketListener( audioManager );
|
||||||
|
|
||||||
MapService mapService = new MapService( mSettingsManager );
|
MapService mapService = new MapService( mSettingsManager );
|
||||||
|
|||||||
Reference in New Issue
Block a user