13
0
Commit Graph

156 Commits

Author SHA1 Message Date
32734ce53c fix portaudio backend to use shared_ptr 2020-04-07 16:00:22 -06:00
b9cb306e8b use shared_ptr to manage backend port lifetimes (Pulse,ALSA,Dummy,JACK)
JACK is not yet finished.

Changes also include minor reformatting and a spelling correction (latecies to latencies)
2020-04-07 13:23:49 -06:00
6a6b3f2703 fix another iterator type 2020-04-02 19:45:31 -06:00
cb4997f4a4 fix iterator type 2020-04-02 19:45:31 -06:00
af69ac1285 use clear_ports() 2020-04-02 19:45:31 -06:00
6cdc245967 fix header name 2020-04-02 19:45:31 -06:00
7fc5a6c971 initial try (not compiled) of PortAudio backend using PortEngineSharedImpl 2020-04-02 19:45:31 -06:00
a8ff35accb
Reset DSP load on backend re-start and after freewheeling 2020-03-30 16:58:55 +02:00
e0d5c1426c
NO-OP: fix some Wimplicit-fallthrough
gcc can recognize various regexps in comments. Since C++17 provides
[[fallthrough]], using /* fallthrough */ consistently seems
appropriate until we switch to C++17.

see also https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
2019-09-18 17:37:54 +02:00
47a62b2850
Update backend GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02:00
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
7258c6334d Namespace PBD::RingBuffer
class RingBuffer<> is a very generic name and should not pollute the
global namespace.
2017-09-16 16:37:29 +02: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
9bf4f339b9 revert 335debfa for the PA backend
The same device may have different names for input + output
2016-11-27 00:42:08 +01:00
335debfa2f Add API to enforce valid device selection. 2016-11-26 15:31:21 +01:00
d10913e2de Fix intermittent hang when stopping PortaudioBackend
This issue is not always reproducible but when it does occur it happens
somewhat consistently on both 32bit and 64bit builds(Tested on Windows 7).

The midiOutReset call does not return (or it takes so long that it might as
well be indefinite) and as it is not strictly necessary just remove it.

Resolves: http://tracker.ardour.org/view.php?id=7095
2016-11-15 09:36:52 +10:00
8b5fad0cf9 Use better debug output in PortaudioBackend
When failing to open audio stream in callback mode
2016-11-10 15:23:43 +10:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
d8ac5eddf7 add missing include 2016-05-06 21:25:21 +02:00
514da9881d convert WinMME Device names to UTF-8 2016-05-06 20:59:24 +02:00
9840a11537 implement metadata-set for remaining backends 2016-04-18 00:35:51 +02:00
ba78359129 prepare for update to waf 1.8
uselib is no longer implicit (inherited by .use). This is still incomplete,
some uselibs for non-linux variants may be missing.

bld.is_defined("HAVE_XXX") also no longer works and will have to be
changed (I think to bld.env["HAVE_XXX"]) in countless places.
2016-02-28 21:16:44 +01:00
9472200727 fix hang at exit (after freewheeling) with PA-nonblocking backend 2016-02-27 00:50:02 +01:00
148f2ab8e5 Add debugging output for WinMME midi device names 2016-02-11 12:15:07 +10:00
1499cd8670 Only build one version of the Portaudio backend that supports both blocking and callback API 2016-02-11 12:15:07 +10:00
830db39585 Implement new AudioBackend API in PA backend to choose between callback and blocking API 2016-02-11 12:15:07 +10:00
d50a821374 Add a missing include from portaudio WINMME source file
Apparently this is now required by my version of gcc/mingw
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
b4fb1d610b Use portaudio callback API by default in portaudio backend 2015-12-02 10:24:07 +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