mirror of
https://github.com/Genymobile/scrcpy
synced 2024-12-18 21:34:32 +00:00
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
@ -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 New Issue
Block a user