portaudio/src/hostapi/alsa
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jean-Michaël Celerier a7bda88e6b Fix a GCC warning due to unsigned substraction
Given

    unsigned int reqRate, setRate, deviation;

then 

    setRate - reqRate

is also an unsigned int - the code works "by chance" as `abs` casts that to an int which overflows and is technically undefined behaviour, for instance for setRate = 44100 and reqRate = 48000.

Thus cast them to int when computing the absolute value to ensure no UB.
2020-12-26 15:41:53 -08:00
..
pa_linux_alsa.c Fix a GCC warning due to unsigned substraction 2020-12-26 15:41:53 -08:00