Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
karlstav committed Sep 3, 2023
1 parent 08fa031 commit e472b7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cava.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ as of 0.4.0 all options are specified in config file, see in '/home/username/.co
// process: check if input is present
silence = true;

for (int n = 0; n < audio.input_buffer_size * 4; n++) {
for (int n = 0; n < audio.input_buffer_size; n++) {
if (audio.cava_in[n]) {
silence = false;
break;
Expand Down
5 changes: 1 addition & 4 deletions cavacore.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct cava_plan *cava_init(int number_of_bars, unsigned int rate, int channels,
return p;
}

int buffer_size = 3072;
int buffer_size = 2048+512;

if (rate > 8125 && rate <= 16250)
buffer_size *= 2;
Expand Down Expand Up @@ -213,9 +213,6 @@ struct cava_plan *cava_init(int number_of_bars, unsigned int rate, int channels,
p->cut_off_frequency[n] = relative_cut_off[n] * ((float)p->rate / 2);
}
}
} else {
if (p->FFTbuffer_upper_cut_off[n - 1] <= p->FFTbuffer_lower_cut_off[n - 1])
p->FFTbuffer_upper_cut_off[n - 1] = p->FFTbuffer_lower_cut_off[n - 1] + 1;
}
}
free(bar_buffer);
Expand Down

0 comments on commit e472b7c

Please sign in to comment.