forked from len0rd/rockbox
Fix some warnings regarding AUDIO_NUM_SOURCES being 0 which is the intent with no inputs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13452 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
14b639d179
commit
080d65f17b
1 changed files with 5 additions and 1 deletions
|
|
@ -23,7 +23,9 @@
|
||||||
|
|
||||||
void audio_set_output_source(int source)
|
void audio_set_output_source(int source)
|
||||||
{
|
{
|
||||||
|
#if INPUT_SRC_CAPS != 0
|
||||||
if ((unsigned)source >= AUDIO_NUM_SOURCES)
|
if ((unsigned)source >= AUDIO_NUM_SOURCES)
|
||||||
|
#endif
|
||||||
source = AUDIO_SRC_PLAYBACK;
|
source = AUDIO_SRC_PLAYBACK;
|
||||||
} /* audio_set_output_source */
|
} /* audio_set_output_source */
|
||||||
|
|
||||||
|
|
@ -32,7 +34,7 @@ void audio_set_source(int source, unsigned flags)
|
||||||
(void)flags;
|
(void)flags;
|
||||||
/* Prevent pops from unneeded switching */
|
/* Prevent pops from unneeded switching */
|
||||||
static int last_source = AUDIO_SRC_PLAYBACK;
|
static int last_source = AUDIO_SRC_PLAYBACK;
|
||||||
#if CONFIG_TUNER
|
#ifdef HAVE_FMRADIO_REC
|
||||||
static bool last_recording = false;
|
static bool last_recording = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -41,11 +43,13 @@ void audio_set_source(int source, unsigned flags)
|
||||||
default: /* playback - no recording */
|
default: /* playback - no recording */
|
||||||
source = AUDIO_SRC_PLAYBACK;
|
source = AUDIO_SRC_PLAYBACK;
|
||||||
case AUDIO_SRC_PLAYBACK:
|
case AUDIO_SRC_PLAYBACK:
|
||||||
|
#ifdef HAVE_RECORDING
|
||||||
if (source != last_source)
|
if (source != last_source)
|
||||||
{
|
{
|
||||||
audiohw_disable_recording();
|
audiohw_disable_recording();
|
||||||
audiohw_set_monitor(false);
|
audiohw_set_monitor(false);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
#ifdef HAVE_MIC_REC
|
#ifdef HAVE_MIC_REC
|
||||||
case AUDIO_SRC_MIC: /* recording only */
|
case AUDIO_SRC_MIC: /* recording only */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue