From 2267bd37b275879ec43e39df5d21ce44a91c742c Mon Sep 17 00:00:00 2001 From: Michael Chicoine Date: Tue, 1 Jun 2010 14:20:33 +0000 Subject: Perform radio_start, radio_pause, radio_stop in simulator. This will allow the radio frequency to be set properly on radio start (currently the frequency is initialized to 0) and prevents sim crashes when loading FMS. It also corrects various FMS token display problems in the sim. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26446 a1c6a512-1295-4272-9138-f99709370657 --- apps/audio_path.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/audio_path.c b/apps/audio_path.c index e928880998..0469d4412a 100644 --- a/apps/audio_path.c +++ b/apps/audio_path.c @@ -135,6 +135,15 @@ void audio_set_input_source(int source, unsigned flags) { (void)source; (void)flags; +#if CONFIG_TUNER + /* Switch radio off or on per source and flags. */ + if (source != AUDIO_SRC_FMRADIO) + radio_stop(); + else if (flags & SRCF_FMRADIO_PAUSED) + radio_pause(); + else + radio_start(); +#endif } /* audio_set_input_source */ #ifdef HAVE_SPDIF_IN -- cgit v1.2.3