From 9f73ca081ee40dc841af393df120768c293d1ea5 Mon Sep 17 00:00:00 2001 From: Nicholas Fasching <91689117+njfdev@users.noreply.github.com> Date: Tue, 30 Jul 2024 14:20:03 -0400 Subject: [PATCH] Fix Switching Between FM and AM Stations Bug in Release Mode --- src/components/RtlSdrControls.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/RtlSdrControls.tsx b/src/components/RtlSdrControls.tsx index ff80692..b9b20f6 100644 --- a/src/components/RtlSdrControls.tsx +++ b/src/components/RtlSdrControls.tsx @@ -108,7 +108,10 @@ export default function RtlSdrControls({ }); useEffect(() => { - if (!requestedStation && status != RtlSdrStatus.Stopped) { + if ( + (!requestedStation && status != RtlSdrStatus.Stopped) || + (requestedStation && requestedStation?.type != currentStationType) + ) { stop_stream(); } }, [requestedStation, status]);