Skip to content

Commit

Permalink
Fix Switching Between FM and AM Stations Bug in Release Mode
Browse files Browse the repository at this point in the history
  • Loading branch information
njfdev committed Jul 30, 2024
1 parent 295b451 commit 9f73ca0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/RtlSdrControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 9f73ca0

Please sign in to comment.