John Melas [Thu, 28 Jan 2021 01:29:24 +0000 (03:29 +0200)]
use variadic arguments in DEFINE_GUID also for MSVC (#374)
The fix for DEFINE_GUID that was recently added in pa_win_wdmks.c is also needed for the MSVC compiler.
Latest versions of the compiler support the /Zc:preprocessor option which is conforming to C99 and later standards
https://docs.microsoft.com/en-us/cpp/build/reference/zc-preprocessor?view=msvc-160
so it generates the exact same error as Clang (too many arguments error).
Ross Bencina [Thu, 21 Jan 2021 13:00:40 +0000 (00:00 +1100)]
Clean up whitespace in qa/ in preparation for .editorconfig. (#418)
* 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.
Ross Bencina [Thu, 21 Jan 2021 12:45:10 +0000 (23:45 +1100)]
Clean up whitespace in test/ in preparation for .editorconfig. (#417)
* 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.
Ross Bencina [Thu, 21 Jan 2021 12:27:43 +0000 (23:27 +1100)]
Clean up whitespace in src/os/unix in preparation for .editorconfig. Convert tabs to 4 spaces. Indent by 4 spaces. Strip trailing whitespace. Ensure EOL at EOF. (#410)
Ross Bencina [Thu, 21 Jan 2021 12:23:00 +0000 (23:23 +1100)]
Clean up whitespace in src/os/win in preparation for .editorconfig. (#409)
* 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.
Ross Bencina [Thu, 21 Jan 2021 11:46:49 +0000 (22:46 +1100)]
Clean up whitespace in pa_win_wmme.c in preparation for .editorconfig (#413)
* 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
Ross Bencina [Thu, 21 Jan 2021 11:32:05 +0000 (22:32 +1100)]
Clean up whitespace in src\hostapi\dsound in preparation for .editorconfig. Convert tabs to 4 spaces. Indent by 4 spaces. Strip trailing whitespace. Ensure EOL at EOF. (#412)
Ross Bencina [Thu, 21 Jan 2021 11:23:23 +0000 (22:23 +1100)]
Clean up whitespace in examples/ in preparation for .editorconfig. Convert tabs to 4 spaces. Indent by 4 spaces. Strip trailing whitespace. Ensure EOL at EOF. (#416)
Ross Bencina [Thu, 21 Jan 2021 11:17:17 +0000 (22:17 +1100)]
Clean up whitespace in pa_asio.cpp in preparation for .editorconfig. Convert tabs to 4 spaces. Indent by 4 spaces. Strip trailing whitespace. Ensure EOL at EOF. (#411)
Ross Bencina [Thu, 21 Jan 2021 10:58:54 +0000 (21:58 +1100)]
Clean up whitespace in src/hostapi/{asihpi, jack, oss, skeleton} in preparation for .editorconfig. (#414)
* 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.
Ross Bencina [Thu, 21 Jan 2021 03:19:22 +0000 (14:19 +1100)]
Clean up whitespace in include/ in preparation for .editorconfig. (#415)
* 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.
Ed Maste [Tue, 19 Jan 2021 20:00:09 +0000 (15:00 -0500)]
OSS: correct test for unsupported formats
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.
Ed Maste [Tue, 19 Jan 2021 21:09:01 +0000 (16:09 -0500)]
OSS: include both /dev/dsp and /dev/dsp0
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.
Report thread running so Pa_StartStream can return prior to PaStreamCallback
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.
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.
dmitrykos [Fri, 11 Dec 2020 13:30:08 +0000 (15:30 +0200)]
wasapi: Fixed underruns in the Exclusive mode on UWP platform (or when timeBeginPeriod does not allow to set 1 ms granularity) by assuming that system timer granularity on UWP equals to 10 msec, make sure time to sleep provided by GetNextSleepTime is aligned to the granularity of the system timer.
Ross Bencina [Thu, 26 Nov 2020 02:46:05 +0000 (13:46 +1100)]
pa_mac_core_utilities: add void to empty function argument list (#355)
Insert "void" in the argument list to turn initializeXRunListenerList and destroyXRunListenerList declarations into valid prototypes. Also update the function definitions to match. Thanks to Paul Boersma.
dmitrykos [Mon, 26 Oct 2020 16:25:10 +0000 (18:25 +0200)]
wasapi: Fixed compilation with MinGW (mingw32): gcc version 6.3.0 (MinGW.org GCC-6.3.0-1), include /mingw-include folder explicitly (when compiling with mingw-w64 the /mingw-include folder must not be included).
dmitrykos [Mon, 26 Oct 2020 14:40:25 +0000 (16:40 +0200)]
wasapi: Support multiple devices in the device list on Windows UWP/WinRT platform. All UWP/WinRT functions are now prefixed as PaWasapiWinrt_ to be clearly visible, therefore PaWasapi_SetDefaultInterfaceId() was renamed to PaWasapiWinrt_SetDefaultDeviceId(). Expanded Important notes regarding UWP/WinRT platform and how to make the fully-functional device list with the corresponding pseudo-code example for easier understanding of the functionality.
Hool, Rory [Thu, 22 Oct 2020 17:53:56 +0000 (13:53 -0400)]
Replace usage of deprecated component manager APIs on 10.6+
These APIs are deprecated in 10.8+ and are disabled on 11.0(10.16)+ https://developer.apple.com/documentation/coreservices/carbon_core/component_manager?language=objc
> "This application, or a library it uses, is using the deprecated Component Manager for hosting Audio Components. This is not supported when rebuilding against the 10.16 or later SDK. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h."
dmitrykos [Thu, 26 Mar 2020 18:50:52 +0000 (20:50 +0200)]
alsa: Introduce possibility to ignore all ALSA plugin devices by setting the environment variable PA_ALSA_IGNORE_ALL_PLUGINS to non-0. Fixed logic of guarding assertion in BuildDeviceList() when only one or none PCM device is available (may occur if PA_ALSA_IGNORE_ALL_PLUGINS is set to non-0 or when device has no any audio device available, including plugin devices).
dmitrykos [Fri, 9 Oct 2020 21:42:20 +0000 (00:42 +0300)]
wasapi: Refactored device list creation, if faulty audio device is reported as active by WASAPI then it will not break device list creation, silenced warnings when compiling for UWP platform.
dmitrykos [Thu, 8 Oct 2020 21:57:23 +0000 (00:57 +0300)]
wasapi: Replace tabs with 4-spaces to comply with PortAudio code style guidelines (http://github.com/PortAudio/portaudio/wiki/ImplementationStyleGuidelines).