@@ -160,6 +160,12 @@ void dmr_recorder_impl::initialize(Source *src) {
160160 recording_count = 0 ;
161161 recording_duration = 0 ;
162162
163+ bool use_streaming = false ;
164+
165+ if (config != NULL ) {
166+ use_streaming = config->enable_audio_streaming ;
167+ }
168+
163169 state = INACTIVE;
164170
165171 timestamp = time (NULL );
@@ -221,7 +227,8 @@ void dmr_recorder_impl::initialize(Source *src) {
221227 framer = gr::op25_repeater::frame_assembler::make (" file:///tmp/out1.raw" , verbosity, 1 , rx_queue);
222228 // op25_frame_assembler = gr::op25_repeater::p25_frame_assembler::make(0, silence_frames, udp_host, udp_port, verbosity, do_imbe, do_output, do_msgq, rx_queue, do_audio_output, do_tdma, do_nocrypt);
223229 levels = gr::blocks::multiply_const_ff::make (1 );
224- plugin_sink = gr::blocks::plugin_wrapper_impl::make (std::bind (&dmr_recorder_impl::plugin_callback_handler, this , std::placeholders::_1, std::placeholders::_2));
230+ plugin_sink_slot0 = gr::blocks::plugin_wrapper_impl::make (std::bind (&dmr_recorder_impl::plugin_callback_handler, this , std::placeholders::_1, std::placeholders::_2));
231+ plugin_sink_slot1 = gr::blocks::plugin_wrapper_impl::make (std::bind (&dmr_recorder_impl::plugin_callback_handler, this , std::placeholders::_1, std::placeholders::_2));
225232
226233 // Squelch DB
227234 // on a trunked network where you know you will have good signal, a carrier
@@ -241,10 +248,15 @@ void dmr_recorder_impl::initialize(Source *src) {
241248 connect (slicer, 0 , framer, 0 );
242249 connect (framer, 0 , wav_sink_slot0, 0 );
243250 connect (framer, 1 , wav_sink_slot1, 0 );
251+
252+ if (use_streaming) {
253+ connect (framer, 0 , plugin_sink_slot0, 0 );
254+ connect (framer, 1 , plugin_sink_slot1, 0 );
255+ }
244256}
245257
246258void dmr_recorder_impl::plugin_callback_handler (int16_t *samples, int sampleCount) {
247- // plugman_audio_callback(_recorder , samples, sampleCount);
259+ plugman_audio_callback (call, this , samples, sampleCount);
248260}
249261
250262void dmr_recorder_impl::switch_tdma (bool phase2) {
0 commit comments