13
0
Commit Graph

80 Commits

Author SHA1 Message Date
076e9fddd4
Remove ambiguous API implementation
* PortEngine::available() implementation
* AudioEngine::connected() wrapper

Eventually we may re-introduce PortEngine::available along
with a libardour internal port-engine.
2018-11-28 15:32:40 +01:00
070f370e40 Fix copy/edit in e047b01aa2 2018-10-18 15:07:45 +02:00
e047b01aa2 add new API for retrieving port flags from backend 2018-10-17 14:11:37 -04:00
e39a8b90d9 amend ab3889ff: portaudio backend uses a vector for connections 2017-09-23 01:06:10 +02:00
ab3889fff8 Propagate Latency to backend/system ports
Set accumulated capture-latency for physical-outputs
and accumulated playback-latency for physical-inputs
after Ardour is done setting all non-physical port latencies.

This will be needed for latency-compensation of the complete graph.
2017-09-23 00:34:01 +02:00
30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
467c801ce8 Abstract definition of rt-scheduler policy
pthread-w32 does not support pthread_setschedparam() with
SCHED_FIFO and bails out. While pthread_create() simply ignores the policy
and sets the priority regadless.

This only affects ctrl-surface event-loops & AutomationWatch on Windows.
2017-08-29 20:35:36 +02:00
df659e91f1 Consolidate _realtime_pthread_create() into libpbd. 2017-08-29 17:25:23 +02:00
26dc287c00 Fix non-buffered PA backend. Wait for backend to become active
This hopefully fixes an issue with port-registration (new session)
being skipped because PortAudioBackend::available() still false
until the first callback.
2017-08-07 23:23:39 +02:00
fd6377a5af PortAudio: skip process callbacks until ports are established 2017-08-07 19:27:37 +02:00
fde07d4f4f amend bc46a7e2e9; fix blind coding typos 2017-08-05 16:17:31 +02:00
bc46a7e2e9 PortAudio backend RT-safe MIDI buffer allocation 2017-08-05 15:36:36 +02:00
2b7c585dba Update backend API: read-only MIDI input buffers 2017-08-05 15:36:36 +02:00
c125cd2647 Reduce DSP thread priority (main-i/o > midi i/o > computation) 2017-08-05 01:28:11 +02:00
6b5d374352 Some more assert() debugging 2017-08-03 23:46:05 +02:00
f9db9bf5fd Retain order of concurrent MIDI events
This fixes an issue with FaderPort8 (and maybe other surfaces or synths).
2017-04-08 23:43:50 +02:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
9840a11537 implement metadata-set for remaining backends 2016-04-18 00:35:51 +02:00
9472200727 fix hang at exit (after freewheeling) with PA-nonblocking backend 2016-02-27 00:50:02 +01:00
830db39585 Implement new AudioBackend API in PA backend to choose between callback and blocking API 2016-02-11 12:15:07 +10:00
b2cf028fcb Implement MIDI device enumeration and latency offset/calibration in portaudio backend 2016-02-11 12:15:07 +10:00
b67892833b ship both blocking and callback PA backends (for debug purposes)
this just works (no symbol conflicts)
2015-12-21 22:12:15 +01:00
fe0802169c standardize port-names 2015-12-08 15:32:05 +01:00
1372407f82 fix previous commit. 2015-12-08 00:52:06 +01:00
8781004ca2 portaudio connect & graph-changed callbacks (untested) 2015-12-08 00:36:29 +01:00
e9be313c11 Fix latency compensation for audio data in portaudio backend
For drivers that correctly report latency values(ASIO) this should result a
much closer alignment of audio in a loopback test. Measurement and
adjustment may still be needed, especially for non-ASIO drivers.

Testing with the RME HDSP Multiface and Yamaha AG06 using ASIO drivers results
in maximum offset of a couple of samples.
2015-12-02 10:24:08 +10:00
5f267f92bf Rename member variables in Portaudio Backend for consistency 2015-12-02 10:24:07 +10:00
29feb914b9 Rename blocking process function in portaudio backend 2015-12-02 10:24:06 +10:00
3e6b28daca Rename blocking thread function in portaudio backend 2015-12-02 10:24:05 +10:00
07b2518979 Fix windows build when using pthreads-win32 library 2015-11-19 20:54:38 +10:00
f1b336b01e Add support for callback API to portaudio backend but keep blocking API as default
Don't use the callback API for now until further and wider testing.
2015-11-19 10:23:26 +10:00
87c36aba60 use new error-messages 2015-10-02 17:51:17 +02:00
aa713fcd83 Return meaningful error codes when PortaudioBackend fails to start
So they can be used to give a contextual error message in the GUI
2015-10-01 09:10:19 +10:00
f178152114 Use portaudio error codes in the PortaudioIO class.
Having error codes defined in PortaudioIO means it is not dependent on the
ErrorCodes in AudioBackend but it doesn't really make sense to have another
set, so just use the PA ones until they become insufficient.
2015-10-01 09:10:19 +10:00
d007fc05b1 De/Initialize MMCSS on windows in PBD::init/cleanup instead of in PA Backend 2015-09-16 11:22:16 +10:00
091c4ed3a7 Move Windows MMCSS related utility functions into libpbd 2015-09-16 11:22:16 +10:00
d76fe212b7 Move MMCSS related utility functions into PBD namespace
In preparation for moving to libpbd
2015-09-16 11:22:16 +10:00
3f5c01e4eb Move Windows timer utility functions from PA backend into libpbd 2015-09-16 11:22:16 +10:00
4ffe8ffc0f Put Windows timer functions into PBD namespace in preparation for moving them to libpbd
Add functions for get/set the Multimedia timer resolution, although we are
really only interested in the minimum, this will facilitate testing

Put timer utility functions inside nested namespaces as they are platform
specific
2015-09-16 11:22:16 +10:00
b2a7393553 Change types in DSPLoadCalculator to signed integer after change in utils::get_microsecond 2015-09-16 11:22:16 +10:00
3618689103 Use MMCSS utility functions in PortaudioBackend 2015-09-02 12:07:59 +10:00
b288a40220 Add utility functions in PortaudioBackend for re/setting MMCSS thread characteristics 2015-09-02 12:07:59 +10:00
77ce989dfa Pass input and output audio buffers into PortaudioBackend blocking process function
This makes it possible to reuse the method for callback based processing
2015-09-02 12:07:59 +10:00
23a490c906 Add two utility methods to abstract PortAudioBackend state
These may change as support for callback API is added
2015-09-02 12:07:58 +10:00
f143d76523 Extract MIDI input/output processing in PortAudioBackend into new methods 2015-09-02 12:07:58 +10:00
a65b1ddedc Add a DSPLoadCalculator class to the PortAudioBackend for DSP load calculation
The class uses the same algorithm as in the coreaudio and alsa backends and
should probably go into libardour at some point
2015-09-02 12:07:58 +10:00
5448c229d9 Extract main processing section of PortAudioBackend into new method 2015-09-02 12:07:58 +10:00
f27d8e1e23 Extract freewheel processing in PortAudioBackend into new method 2015-09-02 12:07:58 +10:00
cf81caa798 Don't update unused dsp timer variable in freewheel process in PortaudioBackend 2015-09-02 12:07:58 +10:00
7b23f80b03 Refactor port change handling part of PA Backend process function into new method 2015-09-02 12:07:58 +10:00