diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-05-20 22:03:11 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-05-20 22:03:11 +0000 |
commit | 080d65f17b86865c9a9aeb9f7ba8d5fa27195051 (patch) | |
tree | 046350595875f6bc4389f0a771122a8d65f5611f /firmware | |
parent | 14b639d179260b1aa80ccc19cac15dada52f4677 (diff) | |
download | rockbox-080d65f17b86865c9a9aeb9f7ba8d5fa27195051.tar.gz rockbox-080d65f17b86865c9a9aeb9f7ba8d5fa27195051.zip |
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
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/arm/audio-pp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/target/arm/audio-pp.c b/firmware/target/arm/audio-pp.c index 82c5545a3f..91670cb015 100644 --- a/firmware/target/arm/audio-pp.c +++ b/firmware/target/arm/audio-pp.c | |||
@@ -23,7 +23,9 @@ | |||
23 | 23 | ||
24 | void audio_set_output_source(int source) | 24 | void audio_set_output_source(int source) |
25 | { | 25 | { |
26 | #if INPUT_SRC_CAPS != 0 | ||
26 | if ((unsigned)source >= AUDIO_NUM_SOURCES) | 27 | if ((unsigned)source >= AUDIO_NUM_SOURCES) |
28 | #endif | ||
27 | source = AUDIO_SRC_PLAYBACK; | 29 | source = AUDIO_SRC_PLAYBACK; |
28 | } /* audio_set_output_source */ | 30 | } /* audio_set_output_source */ |
29 | 31 | ||
@@ -32,7 +34,7 @@ void audio_set_source(int source, unsigned flags) | |||
32 | (void)flags; | 34 | (void)flags; |
33 | /* Prevent pops from unneeded switching */ | 35 | /* Prevent pops from unneeded switching */ |
34 | static int last_source = AUDIO_SRC_PLAYBACK; | 36 | static int last_source = AUDIO_SRC_PLAYBACK; |
35 | #if CONFIG_TUNER | 37 | #ifdef HAVE_FMRADIO_REC |
36 | static bool last_recording = false; | 38 | static bool last_recording = false; |
37 | #endif | 39 | #endif |
38 | 40 | ||
@@ -41,11 +43,13 @@ void audio_set_source(int source, unsigned flags) | |||
41 | default: /* playback - no recording */ | 43 | default: /* playback - no recording */ |
42 | source = AUDIO_SRC_PLAYBACK; | 44 | source = AUDIO_SRC_PLAYBACK; |
43 | case AUDIO_SRC_PLAYBACK: | 45 | case AUDIO_SRC_PLAYBACK: |
46 | #ifdef HAVE_RECORDING | ||
44 | if (source != last_source) | 47 | if (source != last_source) |
45 | { | 48 | { |
46 | audiohw_disable_recording(); | 49 | audiohw_disable_recording(); |
47 | audiohw_set_monitor(false); | 50 | audiohw_set_monitor(false); |
48 | } | 51 | } |
52 | #endif | ||
49 | break; | 53 | break; |
50 | #ifdef HAVE_MIC_REC | 54 | #ifdef HAVE_MIC_REC |
51 | case AUDIO_SRC_MIC: /* recording only */ | 55 | case AUDIO_SRC_MIC: /* recording only */ |