Fix comparison warning
An int was compared with an unsigned: ../app/src/audio_player.c:290:27: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare] if (abs(diff) < ap->sample_rate / 1000) { ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
6b769675fa
commit
80a6fa7a01
1 changed files with 1 additions and 1 deletions
|
@ -287,7 +287,7 @@ sc_audio_player_frame_sink_push(struct sc_frame_sink *sink,
|
|||
|
||||
float avg = sc_average_get(&ap->avg_buffering);
|
||||
int diff = ap->target_buffering - avg;
|
||||
if (abs(diff) < ap->sample_rate / 1000) {
|
||||
if (abs(diff) < (int) ap->sample_rate / 1000) {
|
||||
// Do not compensate for less than 1ms, the error is just noise
|
||||
diff = 0;
|
||||
} else if (diff < 0 && buffered_samples < ap->target_buffering) {
|
||||
|
|
Loading…
Reference in a new issue