forked from len0rd/rockbox
Fix some sim warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26006 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7250405c70
commit
ef0b8caac0
1 changed files with 9 additions and 4 deletions
|
@ -250,8 +250,10 @@ static unsigned int sample_rate;
|
||||||
static int audio_head = 0; /* which of the two buffers to use? */
|
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? */
|
static volatile int audio_tail = 0; /* which of the two buffers to record? */
|
||||||
/* It's stereo, so make the buffer twice as big */
|
/* It's stereo, so make the buffer twice as big */
|
||||||
|
#ifndef SIMULATOR
|
||||||
static int16_t audio_data[2][BUFFER_SIZE];
|
static int16_t audio_data[2][BUFFER_SIZE];
|
||||||
static fixed yin_buffer[YIN_BUFFER_SIZE];
|
static fixed yin_buffer[YIN_BUFFER_SIZE];
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Description of a note of scale */
|
/* Description of a note of scale */
|
||||||
struct note_entry
|
struct note_entry
|
||||||
|
@ -1015,6 +1017,8 @@ void record_and_get_pitch(void)
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
fixed period;
|
fixed period;
|
||||||
bool waiting = false;
|
bool waiting = false;
|
||||||
|
#else
|
||||||
|
audio_tail = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
backlight_force_on();
|
backlight_force_on();
|
||||||
|
@ -1083,14 +1087,15 @@ void record_and_get_pitch(void)
|
||||||
rb->cancel_cpu_boost();
|
rb->cancel_cpu_boost();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#else /* SIMULATOR */
|
|
||||||
/* Display a preselected frequency */
|
|
||||||
display_frequency(int2fixed(445));
|
|
||||||
#endif
|
|
||||||
/* Move to next buffer if not empty (but empty *shouldn't* happen
|
/* Move to next buffer if not empty (but empty *shouldn't* happen
|
||||||
* here). */
|
* here). */
|
||||||
if (audio_head != audio_tail)
|
if (audio_head != audio_tail)
|
||||||
audio_head ^= 1;
|
audio_head ^= 1;
|
||||||
|
#else /* SIMULATOR */
|
||||||
|
/* Display a preselected frequency */
|
||||||
|
display_frequency(int2fixed(445));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rb->pcm_close_recording();
|
rb->pcm_close_recording();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue