From d75291707373ddd8b7db9e8ed949699c22c81767 Mon Sep 17 00:00:00 2001 From: Denny Date: Thu, 20 Sep 2018 04:01:45 -0400 Subject: [PATCH] Resolves #427. Moves the module(s) reset operation to the stop() method so that the modules are reset after they are shut down, in order to prepare for processing chain reuse. Previously, the modules were reset upon startup, but after any traffic channel metadata had already been transferred to the channel state, causing the metadata to be lost and allowing initial audio packets to stream without any metadata and related streaming/monitoring rules. --- .../io/github/dsheirer/module/ProcessingChain.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/io/github/dsheirer/module/ProcessingChain.java b/src/main/java/io/github/dsheirer/module/ProcessingChain.java index 8b4cd8aa..11255615 100644 --- a/src/main/java/io/github/dsheirer/module/ProcessingChain.java +++ b/src/main/java/io/github/dsheirer/module/ProcessingChain.java @@ -565,12 +565,6 @@ public class ProcessingChain implements IChannelEventListener { if(mSource != null) { - //Reset each of the modules - for(Module module : mModules) - { - module.reset(); - } - //Broadcast the source sample rate so that each of the modules can self-configure mSourceEventBroadcaster.broadcast(SourceEvent.sampleRateChange(mSource.getSampleRate(), "Processing Chain Startup")); @@ -652,6 +646,12 @@ public class ProcessingChain implements IChannelEventListener { module.stop(); } + + //Reset each of the modules + for(Module module : mModules) + { + module.reset(); + } } }