forked from len0rd/rockbox
pitch_detector: avoid a division by zero when changing 'lowest frequency' setting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27917 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
67096fae73
commit
5628096e51
1 changed files with 5 additions and 1 deletions
|
@ -1143,7 +1143,11 @@ void init_everything(void)
|
||||||
sample_rate = rb->rec_freq_sampr[sample_rate];
|
sample_rate = rb->rec_freq_sampr[sample_rate];
|
||||||
rb->pcm_set_frequency(sample_rate | SAMPR_TYPE_REC);
|
rb->pcm_set_frequency(sample_rate | SAMPR_TYPE_REC);
|
||||||
rb->pcm_init_recording();
|
rb->pcm_init_recording();
|
||||||
|
|
||||||
|
/* avoid divsion by zero */
|
||||||
|
if(tuner_settings.lowest_freq == 0)
|
||||||
|
tuner_settings.lowest_freq = period2freq(BUFFER_SIZE / 4);
|
||||||
|
|
||||||
/* GUI */
|
/* GUI */
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
front_color = rb->lcd_get_foreground();
|
front_color = rb->lcd_get_foreground();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue