Commit graph

784 commits

Author SHA1 Message Date
Dmitry Kostjuchenko
93df249256
Merge pull request #429 from bluecataudio/fix_wsapi_failure
wasapi: Device list should not fail with error if no audio device found.
2021-01-07 20:36:10 +02:00
Blue Cat Audio
3532e56784 Fix: WASAPI should not fail with error if no device found 2021-01-07 12:52:09 +01:00
Dmitry Kostjuchenko
00df77e6b1
Merge pull request #421 from dechamps/mixdef
Add missing PaWasapi_GetDeviceMixFormat cmake DLL export
2021-01-02 17:30:05 +02:00
Etienne Dechamps
5b75613f06 Add missing PaWasapi_GetDeviceMixFormat cmake DLL export
This omission made it impossible to use PaWasapi_GetDeviceMixFormat()
from a PortAudio DLL built using CMake.
2021-01-01 15:42:20 +00:00
Dmitry Kostjuchenko
d6fc190012
Merge pull request #376 from jmelas/wasapi_mismatch
wasapi: Fix signed/unsigned mismatch warning.
2020-12-29 17:30:48 +02:00
John Melas
159b415af0 fix signed/unsigned mismatch warning 2020-12-29 17:22:57 +02:00
Dmitry Kostjuchenko
a4cbc426d2
Merge pull request #406 from bear101/startstream_block
WASAPI: Report thread running so Pa_StartStream can return
2020-12-29 10:46:16 +02:00
Bjørn Damstedt Rasmussen
2d8c7eb0f7 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.
2020-12-29 09:27:38 +01:00
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