summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2010-05-14 06:41:40 +0000
committerMichael Sevakis <jethead71@rockbox.org>2010-05-14 06:41:40 +0000
commitef0b8caac084c7e7a6f86ea184ad7912f38f619d (patch)
treee5e7fcf8fee50f0c00cbe782ed2567ff291b0e46 /apps/plugins
parent7250405c70a0d2fe8468c225f1e89840266e65c1 (diff)
downloadrockbox-ef0b8caac084c7e7a6f86ea184ad7912f38f619d.zip
rockbox-ef0b8caac084c7e7a6f86ea184ad7912f38f619d.tar.gz
rockbox-ef0b8caac084c7e7a6f86ea184ad7912f38f619d.tar.bz2
rockbox-ef0b8caac084c7e7a6f86ea184ad7912f38f619d.tar.xz
Fix some sim warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26006 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/pitch_detector.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/plugins/pitch_detector.c b/apps/plugins/pitch_detector.c
index 9de8d99..5675cdc 100644
--- a/apps/plugins/pitch_detector.c
+++ b/apps/plugins/pitch_detector.c
@@ -250,8 +250,10 @@ static unsigned int sample_rate;
static int audio_head = 0; /* which of the two buffers to use? */
static volatile int audio_tail = 0; /* which of the two buffers to record? */
/* It's stereo, so make the buffer twice as big */
+#ifndef SIMULATOR
static int16_t audio_data[2][BUFFER_SIZE];
static fixed yin_buffer[YIN_BUFFER_SIZE];
+#endif
/* Description of a note of scale */
struct note_entry
@@ -1015,6 +1017,8 @@ void record_and_get_pitch(void)
#ifndef SIMULATOR
fixed period;
bool waiting = false;
+#else
+ audio_tail = 1;
#endif
backlight_force_on();
@@ -1083,14 +1087,15 @@ void record_and_get_pitch(void)
rb->cancel_cpu_boost();
#endif
}
-#else /* SIMULATOR */
- /* Display a preselected frequency */
- display_frequency(int2fixed(445));
-#endif
+
/* Move to next buffer if not empty (but empty *shouldn't* happen
* here). */
if (audio_head != audio_tail)
audio_head ^= 1;
+#else /* SIMULATOR */
+ /* Display a preselected frequency */
+ display_frequency(int2fixed(445));
+#endif
}
}
rb->pcm_close_recording();