Commit graph

784 commits

Author SHA1 Message Date
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
Dmitry Kostjuchenko
6a90e596b6
Merge pull request #325 from PortAudio/winrt
wasapi: Refactored device list creation, if faulty audio device is re…
2020-10-10 00:43:32 +03:00
dmitrykos
522f982158 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. 2020-10-10 00:42:20 +03:00
Dmitry Kostjuchenko
3913a95a9b
Merge pull request #324 from PortAudio/winrt
wasapi: Replace tabs with 4-spaces to comply with PortAudio code styl…
2020-10-09 00:59:40 +03:00
dmitrykos
aa6ff975af wasapi: Replace tabs with 4-spaces to comply with PortAudio code style guidelines (http://github.com/PortAudio/portaudio/wiki/ImplementationStyleGuidelines). 2020-10-09 00:57:23 +03:00
Ross Bencina
19f638da5a wdmks: ensure that pins that failed creation by PinNew() are set to NULL. Note that PaUtil_AllocateMemory currently calls GlobalAlloc without the GMEM_ZEROINIT flag, so there was no guarantee that filter->pins[pinId] was zero. 2020-10-08 12:03:47 +11:00
Phil Burk
e90b19ef2b docs: change Assembla links to GitHub
Fixes #298
2020-10-08 10:18:37 +11:00
Dmitry Kostjuchenko
7db12305c3
Merge pull request #316 from PortAudio/winrt
wasapi: Fix paInvalidSampleRate (and any other) error code is replaced with paInvalidDevice.
2020-10-05 20:56:42 +03:00
Phil Burk
2a7f8fcd7a build: add new Mac SDKs to configure
Add SDK 10.14 and 10.15 to configure.in

Removed i386 and PPC architectures on Mac because they are
deprecated and make fails if they are used.

The configure file was generated from the configure.in
file by entering this on Linux:

    aclocal
    autoconf

Fixes 308
2020-10-03 17:01:58 -07:00
dmitrykos
dcc2f7fa48 wasapi: Fix paInvalidSampleRate (and any other) error code is replaced with paInvalidDevice if audio client failed to be created due to some reason. 2020-10-03 23:21:11 +03:00
Dmitry Kostjuchenko
8c6cc73265
Merge pull request #307 from PortAudio/winrt
wasapi: Improvement to lower possible cases of underruns due to coarse system timer and time-hungry user-side processing..
2020-10-03 23:00:22 +03:00
dmitrykos
697fcddce5 wasapi: Improve stability of playback in Polling Shared mode with a low host latency requsted (22 ms):
- Implement workaround for system timer coarse granularity causing underruns by using timeBeginPeriod/timeEndPeriod APIs inside the Event and Poll thread handlers.
- Update next sleep time of the Poll rendering loop dynamically depending on time taken for processing/rendering of audio data into the available host buffer to avoid underruns and fit processing time into periodic polling time slots.
- Add support for time slots logging in Poll mode if PA_WASAPI_LOG_TIME_SLOTS is defined. Fixed audible glitches by preloading the whole host buffer before stream is started.
- Fix audible glitches on stream start by preloading the whole host buffer before stream is started.
2020-10-03 22:55:36 +03:00
Tatsuya Matsumoto
519364b9a5 Fix a broken link (Tutorial Start) in README.md. 2020-10-03 07:52:54 -07:00
Ross Bencina
8119355f76
Update bug_report.md with more details 2020-10-01 10:38:48 +10:00
Phil Burk
2a1b7d4ad6 Add bug report template 2020-10-01 10:26:08 +10:00
Phil Burk
df4e0bf405 Create c-cpp.yml
Add continuous integration build test.
2020-09-30 17:16:35 -07:00
Phil Burk
d7c67287b8
Merge pull request #304 from ibauersachs/patch-1
Fix CMake build after renaming readme
2020-09-27 18:28:19 -07:00
Dmitry Kostjuchenko
0326a6573b
Merge pull request #305 from sveinse/feature-wasapi-glitch-fix
wasapi: Implement fix for glitching WASAPI playback in the Shared Mode
2020-09-27 21:17:23 +03:00
Svein Seldal
9ebe293dc5 Implement fix for glitching WASAPI playback #303 2020-09-27 18:28:19 +02:00
Ingo Bauersachs
e1443bae25
Fix CMake build after renaming readme 2020-09-27 00:02:53 +02:00
Phil Burk
a63ed32b99
Merge pull request #299 from RossBencina/RossBencina-README-patch-1
Fix doc and examples references in README.md
2020-09-24 09:55:49 -07:00
Ross Bencina
ffa556a475
Fix doc and examples references in README.md 2020-09-24 14:11:42 +10:00
Ross Bencina
be86be4b8e
Merge pull request #297 from philburk/philburk-patch-readme
Update and rename README.txt to README.md
2020-09-24 14:01:04 +10:00
Phil Burk
7273b8de27
Update and rename README.txt to README.md
Use markdown
2020-09-23 20:36:04 -07:00
Ross Bencina
09087cf5a6 Merge branch 'edechamps-remove-testcvs' into 'master'
Get rid of the garbage testcvs/ directory

+1: Phil Burk, Ross Bencina

Merged-on: https://assembla.com/code/portaudio/git/merge_requests/7106691
2020-08-06 00:38:10 +00:00
Ross Bencina
f828ad5fdc Merge branch 'alsa_uninitialized_dir_fixes' into 'master'
Fix additional cases of uninitialized dir variable in pa_linux_alsa.c

+1: Phil Burk

Merged-on: https://assembla.com/code/portaudio/git/merge_requests/7613051
2020-08-06 00:25:37 +00:00
Ross Bencina
b107f0853a Merge branch 'ticket_263_alsa_uninitialized_var_2' into 'master'
Fix uninitialized dir variable in pa_linux_alsa.c (Version 2)

+1: Ross Bencina, Phil Burk

Merged-on: https://assembla.com/code/portaudio/git/merge_requests/7612921
2020-08-06 00:23:46 +00:00
dmitrykos
799a6834a5 wasapi: Fixed OSVERSIONINFO initialization (patch provided by Carlo Bramini). 2020-03-26 20:05:53 +02:00
Ross Bencina
f269bf93e6 follow up fix related to 933b05c331 (ticket #263 uninitialized dir variable): fix the three other places where dir parameter wasn't set prior to entry to a snd_pcm_*_get_* function. There is some ambiguity about (a) whether this is intentional (i.e. use the rounding dir returned by previous *_get_* call, the PA source code does not indicate), and (b) whether it is meaningful (i.e. whether *_get_* functions actually use the value upon input -- the ALSA docs are not clear. regarding (a): I don't think it's intentional, i think it was just oversight. In any case thr risk is low: the underlying values of period_size, periods_max, periods_min, are all integer and should not be rounded, get_rate_min/get_rate_max are used only for debug reporting (I've set them to 0,0 for a minimal change from the current code, but -1,1 makes more sense). 2019-05-14 07:36:24 +10:00
Ross Bencina
933b05c331 fix uninitialized dir variable in pa_linux_alsa.c GropeDevice() by removing it. pass NULL as parameter to ALSA functions instead. see ticket #263. 2019-05-14 07:00:47 +10:00
Phil Burk
c5d2c51bd6 Merge branch 'removeasio' into 'master'
asio: remove unnecessary ASIO SDK files

+1: Phil Burk

Merged-on: https://assembla.com/code/portaudio/git/merge_requests/7559751
2019-04-26 16:48:28 +00:00
Phil Burk
ab665735ad asio: remove unnecessary ASIO SDK files
These files should be obtained directly from Steinberg.
2019-04-26 09:43:52 -07:00
Dmitry Kostjuchenko
eb6b5e2598 Merge branch 'winrt' into 'master'
WASAPI: Add paWinWasapiAutoConvert flag, which sets AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM | AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY for Shared mode streams.

Merged-on: https://assembla.com/code/portaudio/git/merge_requests/7481081
2019-04-05 07:42:43 +00:00
dmitrykos
c40b969e1b wasapi: some cleanup of Jörn Heusipp's patch 2019-04-05 10:38:44 +03:00
Jörn Heusipp
aa0748a5b5 wasapi: Add paWinWasapiAutoConvert flag, which sets AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM | AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY for Shared mode streams.
AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM is required in order to allow for sample rates other than the system mixer configured sample rate. Otherwise, WASAPI is limited to a single system configured sample rate in Shared mode, which is a severe limitation compared to other APIs supported by PortAudio.
AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY is recommended to be used additionally.
See <https://docs.microsoft.com/en-us/windows/desktop/coreaudio/audclnt-streamflags-xxx-constants> for documentation.

GetClosestFormat is modified to exit early when paWinWasapiAutoConvert is set in Shared mode because we trust the WASAPI conversions to succeed.

We restrict these changes to Windows 7 (and later) because documentation does not clearly state the minimum required Windows version. Windows Vista was not available for testing.

This patch has been in production in OpenMPT (<https://openmpt.org/>) since version 1.27.01.00 (2017-09-27). PortAudio WASAPI Shared mode is the default output device type in OpenMPT for Windows 7 (and later) and also for Wine setups.
2019-04-05 10:02:17 +03:00
Dmitry Kostjuchenko
d7229de83b Merge branch 'winrt' into 'master'
WASAPI: Fix failing with unsupported format error if PaWasapiStreamCategory is other than default

Merged-on: https://assembla.com/code/portaudio/git/merge_requests/7376301
2019-04-05 06:53:39 +00:00
dmitrykos
d99940b26e wasapi: set IAudioClient2+ properties before GetClosestFormat() in order to avoid failing with unsupported format error if PaWasapiStreamCategory is other than default, for example eAudioCategorySpeech 2019-03-09 12:43:14 +02:00
Dmitry Kostjuchenko
7bfa11f463 Merge branch 'winrt' into 'master'
WASAPI: Improved audio output stability in Exclusive mode for some UAC2 DACs

Merged-on: https://assembla.com/code/portaudio/git/merge_requests/7327181
2019-02-23 21:04:57 +00:00
dmitrykos
96f81c0ec1 wasapi: Improved audio output stability in Exclusive mode for some UAC2 DACs with custom USB Audio driver by calculating buffer periodicity being equal (or almost equal) to the requested user frames (Capturing is excluded from this implementation as it has not yet been tested but can be included if tests show the improvement), cleanup/refactor some code to make it better readable 2019-02-23 23:02:38 +02:00
Dmitry Kostjuchenko
b7870b08f7 Merge branch 'winrt' into 'master'
WASAPI: new API PaWasapi_SetStreamStateHandler(), header cleanup and minor fix

Merged-on: https://assembla.com/code/portaudio/git/merge_requests/7129721
2018-12-24 12:22:35 +00:00
dmitrykos
83ab55b62d wasapi: new API PaWasapi_SetStreamStateHandler() to be able to catch WASAPI error inside the rendering thread loop (and handle it gracefully, for example restart the stream), protect from dangling pointer during device list update, cleanup header 2018-12-24 14:20:29 +02:00
Etienne Dechamps
8d0e18f87b Get rid of the garbage testcvs/ directory. 2018-12-15 15:15:59 +00:00
Etienne Dechamps
76e31c2a24 Merge branch 'winbuild' into 'master'
Improvements to CMake build system on Windows

Merged-on: https://assembla.com/code/portaudio/git/merge_requests/7040151
2018-12-15 15:06:22 +00:00