* Clean up whitespace in qa/ in preparation for .editorconfig. Convert tabs to 4 spaces. Indent by 4 spaces. Strip trailing whitespace. Ensure EOL at EOF.
* Clean up whitespace in test/ in preparation for .editorconfig. Convert tabs to 4 spaces. Indent by 4 spaces. Strip trailing whitespace. Ensure EOL at EOF.
* Clean up whitespace in src/os/win in preparation for .editorconfig. Convert tabs to 4 spaces. Indent by 4 spaces. Strip trailing whitespace. Ensure EOL at EOF.
* Clean up whitespace in pa_win_wmme.c in preparation for .editorconfig. Convert tabs to 4 spaces. Indent by 4 spaces. Strip trailing whitespace. Ensure EOL at EOF.
* vertically align trailing comments on 4 space boundary
* Clean up whitespace in src/hostapi/{asihpi, jack, oss, skeleton} in preparation for .editorconfig. Convert tabs to 4 spaces. Indent by 4 spaces. Strip trailing whitespace. Ensure EOL at EOF.
* Additional formatting cleanups.
* Clean up whitespace in include/ in preparation for .editorconfig. Convert tabs to 4 spaces. Indent by 4 spaces. Strip trailing whitespace. Ensure EOL at EOF.
Previously GetAvailableFormats returned paSampleFormatNotSupported if
AFMT_S16_NE was not supported, regardless of the supported state of any
other formats. Instead, return paSampleFormatNotSupported if no
supported formats are found.
On FreeBSD /dev/dsp is the default device but may not be /dev/dsp0.
PortAudio in the FreeBSD ports collection initially had a patch to
replace the default device with /dev/dsp (for example, with three
devices and /dev/dsp1 as the default we'd have /dev/dsp0, /dev/dsp,
/dev/dsp2). This caused some trouble (the first device is no longer
default) and was later replaced with this change, leaving /dev/dsp
as the first entry, and just adding each /dev/dsp%d that exists.
FreeBSD bugs 208968 and 236118.
StartStream() calls WaitForSingleObject(stream->hThreadStart, 60*1000)
but it will not be able to return until X number of PaStreamCallback
have been performed by ProcessOutputBuffer().
The above behaviour will cause a deadlock if the user supplied
PaStreamCallback tries to access a shared lock currently held by the
function calling Pa_StartStream().
Also it's a bit weird that you start receiving PaStreamCallbacks
before Pa_StartStream() is able to complete.
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.
Use sine wave instead of sawtooth because it is
easier to hear glitches.
Add some options:
-a - Test ALL devices, otherwise just the default devices.
-i - Test INPUT only.
-o - Test OUTPUT only.