Commit graph

676 commits

Author SHA1 Message Date
MichalPetryka
f4a9023400 Align slashes 2020-12-28 08:22:23 -08:00
MichalPetryka
6f90db9612 Update pa_win_wmme.c 2020-12-28 08:22:23 -08:00
petris
17b895bb8f Fix ANSI in MME and DSound 2020-12-28 08:22:23 -08:00
Ross Bencina
7ffe61ea26 Fix uninitialized variable warnings. Improved solution for PR #377 2020-12-28 23:19:59 +11:00
Ross Bencina
6a676d3ecb wdmks: Reset packet->Header.OptionsFlags = 0 for each packet. Fixes issue with Focusrite Scarlett 2i4 (1st Gen). Fixes #310 2020-12-27 23:04:42 +11:00
Ross Bencina
fb9b6463eb Rename build steps for clarity. 2020-12-27 23:03:46 +11:00
Ross Bencina
cdd1cf69fe Add new GitHub action to build PortAudio using the MSVC project file. Fixes #368. 2020-12-27 23:03:46 +11:00
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
Phil Burk
63bbb63343 paqa_devs.c: improve file comment 2020-12-26 08:47:56 -08:00
Phil Burk
d68a78d30b paqa_devs.c: remove some white space 2020-12-26 08:47:56 -08:00
Phil Burk
5f869e787e paqa_devs: test default device
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.
2020-12-26 08:47:56 -08:00
Ross Bencina
1a5c410f7f return paInternalError from PaWasapi_UpdateDeviceList() when it is disabled 2020-12-21 16:37:38 +11:00
Ross Bencina
4ce9f0d0a8 fix issue #321 broken MSVC build. Always define PaWasapi_UpdateDeviceList() even when it is a no-op because it is mentioned in the .def file. 2020-12-21 16:37:38 +11:00
Ross Bencina
609b998334 Fix compiler warnings: 'type cast': conversion from 'int' to 'HWAVEIN' of greater size. See ticket #370 2020-12-21 16:35:52 +11:00
Phil Burk
cff8571659
Merge pull request #344 from daschuer/ChameleonPatch
Don't crash if alsa_snd_pcm_poll_descriptors fails
2020-12-18 09:57:32 -08:00
Phil Burk
0da139d46d
Merge pull request #373 from jmelas/dword_thread
Change PaWinUtilComInitializationResult::initializingThreadId to DWORD to match the native type of WIN32 thread id
2020-12-18 09:50:36 -08:00
John Melas
7503d9f239 fix non latin1 character in pa_debugprint.c 2020-12-18 22:58:22 +11:00
John Melas
1c54d71e2a use DWORD for thread id 2020-12-18 11:50:44 +02:00
Dmitry Kostjuchenko
3c6337b268
Merge pull request #364 from MichalPetryka/patch-1
Update def files for #340
2020-12-18 09:30:49 +02:00
MichalPetryka
11a3e23917
Update portaudio.def 2020-12-17 10:53:44 +01:00
MichalPetryka
b900df6d9d
Add PaWasapiWinrt_PopulateDeviceList 2020-12-17 09:53:16 +01:00
MichalPetryka
e5cb1a620f
Update def files for #340 2020-12-15 19:39:22 +01:00
Daniel Schürmann
9ddb047ab1 Improve code style 2020-12-14 08:22:54 +01:00
Daniel Schürmann
8f63b51808 Don't crash for alsa_snd_pcm_poll_descriptors fail in another case 2020-12-14 08:03:04 +01:00
Phil Burk
e76f8fdd40
Merge pull request #361 from luzpaz/typos
Fix user-facing and non-user-facing typos
2020-12-13 14:39:55 -08:00
luzpaz
0588b306c4
Revert typo
Co-authored-by: Phil Burk <philburk@mobileer.com>
2020-12-12 21:35:50 -05:00
luz paz
e1c3e59ee8 Fix user-facing and non-user-facing typos
Found via `codespell v2.1.dev0`
2020-12-11 20:24:05 -05:00
Dmitry Kostjuchenko
37a97ac470
Merge pull request #362 from PortAudio/winrt
wasapi: Fixed underruns in the Exclusive mode on UWP platform.
2020-12-11 15:33:26 +02:00
dmitrykos
f3924081ab 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. 2020-12-11 15:30:08 +02:00
Nemirtingas
e5279859ce
Fix GUID defines in pa_win_wdmks.c when compiling with clang-cl (#327)
Fix GUID defines in pa_win_wdmks.c when compiling with clang-cl

Co-authored-by: Nemirtingas <nanaki89@hotmail.fr>
2020-12-08 17:28:56 +11:00
Dmitry Kostjuchenko
5f35d35ad0
Fixed breaking strict-aliasing rules (if compiled with GCC with -fstrict-aliasing) in PaWin_InitializeWaveFormatExtensible(). (#342) 2020-12-08 17:26:54 +11:00
Daniel Schürmann
b37657be70 Remove superfluid void cast 2020-11-27 08:40:45 +01:00
Ross Bencina
521209c633
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.
2020-11-26 13:46:05 +11:00
Paul Boersma
4793ce4fbf
Add missing void argument, and include include pa_jack.h in pa_jack.c (#347)
* Update pa_jack.c

include `pa_jack.h` in `pa_jack.c`, which provides prototypes for PaJack_SetClientName() and PaJack_GetClientName()

* Update pa_unix_util.h

PaUnixThreading_Initialize() is not a prototype in C, make it PaUnixThreading_Initialize(void)

* Update pa_unix_util.c

make PaUnixThreading_Initialize definition correspond to prototype
2020-11-26 12:39:01 +11:00
Colin McEwan
7e2a33c875
Fix crashes on disconnected pins in wmdks topologies. (#300)
* Fix crashes on disconnected pins in wmdks topologies.
* Fix potential assert on disconnected physical output pin in PinNew
2020-11-19 13:22:22 +11:00
Daniel Schürmann
ccc88607b6 Don't crash if alsa_snd_pcm_poll_descriptors fails 2020-11-12 00:25:34 +01:00
Phil Burk
88c71a6ec4
Merge pull request #338 from hoolrory/ticket_218_2
Replace usage of deprecated component manager APIs on 10.6+
2020-10-28 17:32:30 -07:00
Nemirtingas
fd0d181261 Add the install interface. 2020-10-29 11:30:33 +11:00
Dmitry Kostjuchenko
f1cd56e05b
Merge pull request #341 from PortAudio/winrt
wasapi: Fixed compilation with MinGW32 (original mingw32, not mingw-w64).
2020-10-26 22:29:00 +02:00
dmitrykos
b3592b0749 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). 2020-10-26 21:28:37 +02:00
Dmitry Kostjuchenko
e86babdcb2
Merge pull request #340 from PortAudio/winrt
wasapi: Support multiple devices in the device list on Windows UWP/WiRT platform.
2020-10-26 16:49:44 +02:00
dmitrykos
a5fb8d94aa 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. 2020-10-26 16:40:25 +02:00
Hool, Rory
b1a0902852 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."
2020-10-22 13:53:56 -04:00
Etienne Dechamps
9d3e583ce5 Add a GitHub action for building with CMake on MSVC. 2020-10-22 08:16:51 -07:00
Etienne Dechamps
e96c5dbdec Add a GitHub action for building with CMake. 2020-10-22 08:16:51 -07:00
Dmitry Kostjuchenko
da20219f27
Merge pull request #312 from PortAudio/alsa_ignore_all_plugins
alsa: Option to ignore all ALSA plugin devices.
2020-10-22 10:34:51 +03:00
Jean-Michaël Celerier
58fe947b7f Add support for enabling dynamic alsa loading in CMakeLists.txt
It had been added to the source code a long time ago, but was not integrated to the
build system.
2020-10-22 11:50:48 +11:00
Etienne Dechamps
5bc01421c8 Add a GitHub action for cross-compiling to MinGW via CMake. 2020-10-22 11:40:11 +11:00
Etienne Dechamps
bd5b68a62b Ignore files generated by Visual Studio 2017/2019. 2020-10-22 11:31:37 +11:00
dmitrykos
6bb858643b 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). 2020-10-15 11:05:05 +03:00