| @@ -71,7 +71,9 @@ func runDSP(ctx context.Context, srcMgr *sourceManager, cfg config.Config, det * | |||||
| streamSignals = stableSignals | streamSignals = stableSignals | ||||
| } | } | ||||
| if rec != nil && len(art.allIQ) > 0 { | if rec != nil && len(art.allIQ) > 0 { | ||||
| log.Printf("LIVEAUDIO DSP: detailIQ=%d displaySignals=%d streamSignals=%d stableSignals=%d allIQ=%d", len(art.detailIQ), len(displaySignals), len(streamSignals), len(stableSignals), len(art.allIQ)) | |||||
| if rt.cfg.Recorder.DebugLiveAudio { | |||||
| log.Printf("LIVEAUDIO DSP: detailIQ=%d displaySignals=%d streamSignals=%d stableSignals=%d allIQ=%d", len(art.detailIQ), len(displaySignals), len(streamSignals), len(stableSignals), len(art.allIQ)) | |||||
| } | |||||
| aqCfg := extractionConfig{firTaps: rt.cfg.Recorder.ExtractionTaps, bwMult: rt.cfg.Recorder.ExtractionBwMult} | aqCfg := extractionConfig{firTaps: rt.cfg.Recorder.ExtractionTaps, bwMult: rt.cfg.Recorder.ExtractionBwMult} | ||||
| streamSnips, streamRates := extractForStreaming(extractMgr, art.allIQ, rt.cfg.SampleRate, rt.cfg.CenterHz, streamSignals, rt.streamPhaseState, rt.streamOverlap, aqCfg) | streamSnips, streamRates := extractForStreaming(extractMgr, art.allIQ, rt.cfg.SampleRate, rt.cfg.CenterHz, streamSignals, rt.streamPhaseState, rt.streamOverlap, aqCfg) | ||||
| items := make([]recorder.StreamFeedItem, 0, len(streamSignals)) | items := make([]recorder.StreamFeedItem, 0, len(streamSignals)) | ||||
| @@ -84,7 +86,9 @@ func runDSP(ctx context.Context, srcMgr *sourceManager, cfg config.Config, det * | |||||
| if j < len(streamSnips) { | if j < len(streamSnips) { | ||||
| snipLen = len(streamSnips[j]) | snipLen = len(streamSnips[j]) | ||||
| } | } | ||||
| log.Printf("LIVEAUDIO DSP: streamSignal idx=%d id=%d center=%.3fMHz bw=%.0f class=%s snip=%d", j, ds.ID, ds.CenterHz/1e6, ds.BWHz, className, snipLen) | |||||
| if rt.cfg.Recorder.DebugLiveAudio { | |||||
| log.Printf("LIVEAUDIO DSP: streamSignal idx=%d id=%d center=%.3fMHz bw=%.0f class=%s snip=%d", j, ds.ID, ds.CenterHz/1e6, ds.BWHz, className, snipLen) | |||||
| } | |||||
| if ds.ID == 0 || ds.Class == nil { | if ds.ID == 0 || ds.Class == nil { | ||||
| continue | continue | ||||
| } | } | ||||
| @@ -97,7 +101,9 @@ func runDSP(ctx context.Context, srcMgr *sourceManager, cfg config.Config, det * | |||||
| } | } | ||||
| items = append(items, recorder.StreamFeedItem{Signal: ds, Snippet: streamSnips[j], SnipRate: snipRate}) | items = append(items, recorder.StreamFeedItem{Signal: ds, Snippet: streamSnips[j], SnipRate: snipRate}) | ||||
| } | } | ||||
| log.Printf("LIVEAUDIO DSP: feedItems=%d", len(items)) | |||||
| if rt.cfg.Recorder.DebugLiveAudio { | |||||
| log.Printf("LIVEAUDIO DSP: feedItems=%d", len(items)) | |||||
| } | |||||
| if len(items) > 0 { | if len(items) > 0 { | ||||
| rec.FeedSnippets(items) | rec.FeedSnippets(items) | ||||
| } | } | ||||
| @@ -22,13 +22,13 @@ pipeline: | |||||
| monitor_span_hz: 20000000 | monitor_span_hz: 20000000 | ||||
| monitor_windows: | monitor_windows: | ||||
| - name: fm-focus | - name: fm-focus | ||||
| start_hz: 99.5e6 | |||||
| end_hz: 104.5e6 | |||||
| start_hz: 87.5e6 | |||||
| end_hz: 108.0e6 | |||||
| priority: 1.25 | priority: 1.25 | ||||
| zone: focus | zone: focus | ||||
| - name: fm-rds | - name: fm-rds | ||||
| start_hz: 100.0e6 | |||||
| end_hz: 103.5e6 | |||||
| start_hz: 87.5e6 | |||||
| end_hz: 108.0e6 | |||||
| priority: 1.35 | priority: 1.35 | ||||
| zone: decode | zone: decode | ||||
| signal_priorities: ["wfm", "rds", "broadcast"] | signal_priorities: ["wfm", "rds", "broadcast"] | ||||
| @@ -240,6 +240,7 @@ recorder: | |||||
| deemphasis_us: 50 | deemphasis_us: 50 | ||||
| extraction_fir_taps: 101 | extraction_fir_taps: 101 | ||||
| extraction_bw_mult: 1.35 | extraction_bw_mult: 1.35 | ||||
| debug_live_audio: false | |||||
| decoder: | decoder: | ||||
| ft8_cmd: C:/WSJT/wsjtx-2.7.0-rc6/bin/jt9.exe -8 {audio} | ft8_cmd: C:/WSJT/wsjtx-2.7.0-rc6/bin/jt9.exe -8 {audio} | ||||
| wspr_cmd: C:/WSJT/wsjtx-2.7.0-rc6/bin/wsprd.exe {audio} | wspr_cmd: C:/WSJT/wsjtx-2.7.0-rc6/bin/wsprd.exe {audio} | ||||
| @@ -72,6 +72,7 @@ type RecorderConfig struct { | |||||
| DeemphasisUs float64 `yaml:"deemphasis_us" json:"deemphasis_us"` // De-emphasis time constant in µs. 50=Europe, 75=US/Japan, 0=disabled. Default: 50 | DeemphasisUs float64 `yaml:"deemphasis_us" json:"deemphasis_us"` // De-emphasis time constant in µs. 50=Europe, 75=US/Japan, 0=disabled. Default: 50 | ||||
| ExtractionTaps int `yaml:"extraction_fir_taps" json:"extraction_fir_taps"` // FIR tap count for extraction filter. Default: 101, max 301 | ExtractionTaps int `yaml:"extraction_fir_taps" json:"extraction_fir_taps"` // FIR tap count for extraction filter. Default: 101, max 301 | ||||
| ExtractionBwMult float64 `yaml:"extraction_bw_mult" json:"extraction_bw_mult"` // BW multiplier for extraction. Default: 1.2 (20% wider than detected) | ExtractionBwMult float64 `yaml:"extraction_bw_mult" json:"extraction_bw_mult"` // BW multiplier for extraction. Default: 1.2 (20% wider than detected) | ||||
| DebugLiveAudio bool `yaml:"debug_live_audio" json:"debug_live_audio"` | |||||
| } | } | ||||
| type DecoderConfig struct { | type DecoderConfig struct { | ||||
| @@ -251,9 +251,12 @@ func (st *Streamer) FeedSnippets(items []streamFeedItem) { | |||||
| recEnabled := st.policy.Enabled && (st.policy.RecordAudio || st.policy.RecordIQ) | recEnabled := st.policy.Enabled && (st.policy.RecordAudio || st.policy.RecordIQ) | ||||
| hasListeners := st.hasListenersLocked() | hasListeners := st.hasListenersLocked() | ||||
| pending := len(st.pendingListens) | pending := len(st.pendingListens) | ||||
| debugLiveAudio := st.policy.DebugLiveAudio | |||||
| st.mu.Unlock() | st.mu.Unlock() | ||||
| log.Printf("LIVEAUDIO STREAM: feedSnippets items=%d recEnabled=%v hasListeners=%v pending=%d", len(items), recEnabled, hasListeners, pending) | |||||
| if debugLiveAudio { | |||||
| log.Printf("LIVEAUDIO STREAM: feedSnippets items=%d recEnabled=%v hasListeners=%v pending=%d", len(items), recEnabled, hasListeners, pending) | |||||
| } | |||||
| if (!recEnabled && !hasListeners) || len(items) == 0 { | if (!recEnabled && !hasListeners) || len(items) == 0 { | ||||
| return | return | ||||
| } | } | ||||
| @@ -300,7 +303,9 @@ func (st *Streamer) processFeed(msg streamFeedMsg) { | |||||
| className = string(sig.Class.ModType) | className = string(sig.Class.ModType) | ||||
| demodName, _ = resolveDemod(sig) | demodName, _ = resolveDemod(sig) | ||||
| } | } | ||||
| log.Printf("LIVEAUDIO STREAM: signal id=%d center=%.3fMHz bw=%.0f snr=%.1f class=%s demod=%s needsRecord=%v needsListen=%v", sig.ID, sig.CenterHz/1e6, sig.BWHz, sig.SNRDb, className, demodName, needsRecording, needsListen) | |||||
| if st.policy.DebugLiveAudio { | |||||
| log.Printf("LIVEAUDIO STREAM: signal id=%d center=%.3fMHz bw=%.0f snr=%.1f class=%s demod=%s needsRecord=%v needsListen=%v", sig.ID, sig.CenterHz/1e6, sig.BWHz, sig.SNRDb, className, demodName, needsRecording, needsListen) | |||||
| } | |||||
| if !needsRecording && !needsListen { | if !needsRecording && !needsListen { | ||||
| continue | continue | ||||