13
0
Commit Graph

212 Commits

Author SHA1 Message Date
37a9803542 avoid compiler warning on at least some linux versions 2018-05-04 08:25:04 -04:00
48c1a24284 Fix some clang warnings (argument with 'nonnull' attribute passed null) 2018-01-26 18:07:23 +01:00
4ebcef53f8 Relax max MIDI msg size to 256 (for long sysex)
(win-mme already used 256, CoreMIDI can handle up to 256 as can ALSA)
2017-12-19 17:41:57 +01:00
332a7e56ca Increase ALSA max MIDI msg size to 128 bytes (same as OSX) for long sysex 2017-12-05 16:09:46 +01:00
c0f27be59e Fix/update alsa backend build recipe (statically link zresampler) 2017-10-29 20:03:51 +01:00
79374df84e fix preprocessor error on some/many systems 2017-10-26 15:44:09 -04: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
8337982766 Prototype using additional ALSA devices (w/resampling). 2017-09-18 16:13:55 +02:00
128a985361 ALSA Backend: Separate Device Reservation into its own class 2017-09-18 14:50:31 +02: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
59a63a08f9 ALSA 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
0d668b9beb ALSA backend: always register ports with systemic latency
and allow re-start to un/set reporting latency.
2017-04-27 20:59:15 +02:00
d7d86a99d2 Re-nice ALSA MIDI port names 2017-04-21 10:43:22 +02:00
6968c9f909 Drain ALSA raw-midi buffers after 64 bytes
Very long sequence of *concurrent* events may otherwise be truncated
because the backend requests a buffer-size of 64 bytes via
snd_rawmidi_params_set_buffer_size().
2017-04-09 05:03:19 +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
335debfa2f Add API to enforce valid device selection. 2016-11-26 15:31:21 +01:00
69cbcb84a6 spelling corrections from Jaromír Mikeš <mira.mikes@seznam.cz>
Corresponds to https://anonscm.debian.org/cgit/pkg-multimedia/ardour.git/tree/debian/patches/0070-spelling.patch
2016-10-17 17:57:39 -04:00
Kamil Rytarowski
1ac7dad84e NetBSD ships with pollts(2) similar to Linux specific ppoll() 2016-10-04 22:17:49 +02:00
Kamil Rytarowski
f69776e5b7 NetBSD ships with <sys/endian.h> not <endian.h> 2016-10-04 22:17:12 +02:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
8444837b71 properly sort port-names 2016-07-14 16:52:43 +02:00
ac923be7af fix port-sort order for good.
TODO find out how to make std::set::find() work with custom sort order,
as std::find may only be O(N) and not O(log (N)).
2016-07-08 21:37:42 +02:00
f84a7605d8 pre-sort port-names 2016-07-08 20:44:21 +02:00
60200bf923 bump max number of possible ALSA backend channels 2016-05-29 20:36:32 +02:00
43e620504a port 93eac8b0 to ALSA and CoreAudio 2016-04-26 18:19:48 +02:00
2169de3975 keep portmap & portindex in sync when renaming ports
Fixes crash on session re-load (introduced in 800c8182 and fde99e68)
2016-04-26 02:26:20 +02:00
800c8182c6 O(log(n)) port and connection lookup for ALSA 2016-04-24 20:45:37 +02:00
9840a11537 implement metadata-set for remaining backends 2016-04-18 00:35:51 +02:00
10140a8e68 implement pretty-name set-property for ALSA and Dummy 2016-04-17 18:22:21 +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
cf6a3afcaa name ALSA midi ports after device 2016-01-11 11:46:10 +01:00
4dc49ee4fa fix -Wreorder 2015-12-05 02:42:58 +01:00
a6f27f09a7 update ALSA backend: separate playback/capture periods
fixed: 2 for capture,  configurable 2,3 for playback.
2015-12-05 01:53:13 +01:00
bfd2cbaa3f ALSA: allow to dynamically add/remove midi devices & update their latency. 2015-12-04 22:19:47 +01:00
ac075560bd ALSA: allow to measure & set systemic audio latency w/o restart.
(MIDI needs a bit more work)
2015-12-04 17:45:49 +01:00
990fd75c5f implement ALSA period/cycle setting 2015-12-04 10:16:19 +01:00
87c36aba60 use new error-messages 2015-10-02 17:51:17 +02:00
6b4e5f1d47 ALSA: update error-codes for HW initialization. 2015-10-01 12:42:05 +02:00
dcf327f86a Return meaningful error codes when ALSA backend fails to start
Unfortunately it seems that in zita-alsa-pcmi doesn't set state() correctly in
some cases. Setting an invalid SR doesn't display the correct error message,
first guess would be that set_hwpar is failing and state() is not
representative of the actual error.
2015-10-01 09:10:19 +10:00
1691e965a5 update reported DSP load for ALSA & Dummy 2015-09-16 18:24:57 +02:00
782dbf0e3f Set max time of DSPLoadCalculator in every cycle in ALSA backend 2015-09-16 11:22:17 +10:00
ccfe3e1015 Use ARDOUR::DSPLoadCalculator in ALSA Backend 2015-09-16 11:22:17 +10:00
fa32fa1abe replace "None" with DeviceNone in ALSA/Coreaudio
TODO: separate MidiSystemNone
2015-09-02 13:33:40 +02:00
548340eb05 remove -Woverload-virtual ambiguity (from 1d3690d)
this breaks compilation in engine_dialog.cc
2015-08-11 23:50:56 +02:00
a226c4ce38 ALSA backend: query and cache available device-parameters 2015-08-11 19:01:52 +02:00
dc2030cfd7 ALSA backend: add support for half-duplex devices 2015-06-14 22:26:06 +02:00
94c146c780 prepare ALSA backend for half-duplex 2015-06-14 22:26:06 +02:00
56cc3e2407 fix portengin get_ports() flags API
require all flags to be present (same as jack)
2015-05-03 22:34:52 +02:00
49ffcd0d9d clamp DSP load displsy 100% & relax LPF. 2015-04-30 02:00:50 +02:00
e3cd57ecb6 DSP load calculation: favor peak over average. 2015-04-29 21:27:37 +02:00
52e99750a0 ALSA: fix thinko in sample time calc. 2015-03-09 17:17:50 +01:00
09dd3fc369 some backends can handle incorrectly ordered midi events.
(that can happen if multiple sources send to the same
ouput port, in particular async midi events)
2015-03-09 05:41:36 +01:00
659a8a26ae fix latency report, take buffersize changes into account. 2015-03-07 14:35:32 +01:00
2ab26bd86d fix another screwup/typo in 782dd70 2015-03-05 02:10:21 +01:00
7ef22e5e71 remove unused devel.variable in prev commit 2015-03-05 02:04:14 +01:00
782dd70875 alsa: implement timing callback 2015-03-05 01:59:59 +01:00
e3dd226ffa Change order of midi entries so a new backend will default to a working midi system.
Needs testing on all platforms.
2015-03-03 15:57:08 -06:00
582138f280 change Audio backend sample time methods to use a 64 bit timeline 2015-02-19 17:44:01 -05:00
8a93a87db0 remove lib versioning for internal plugins
Those objects do not have a versioned API by themselves.
This fixes issues with duplicate deployment (OSX, Linux bundles: cp) and
ardour listing control-surfaces multiple times (file index plugin dir).
2015-02-16 17:32:56 +01:00
cf8e7bc135 ALSA-backend separate report for error and x-run 2015-01-28 13:47:24 +01:00
397ce4ccc7 ALSA-Backend prefer ppoll() 2015-01-28 13:47:24 +01:00
db28eefc49 ALSA backend: synchronous switch to/from freewheeling 2015-01-24 23:39:41 +01:00
f499f4cfd2 don't take temporary copy of MIDI sequence
fixes potential boost shared_ptr double free.
2014-12-31 03:19:00 +01:00
7aab4be5e4 alsa-backend: drop midi during freewheel processing. 2014-12-02 17:03:29 +01:00
f2273dc3b6 remove dead assignment 2014-11-18 02:15:06 +01:00
bd46de779f check alsa midi ringbuffer 2014-11-17 06:50:48 +01:00
d991bb10ca add 'available' interface to the AudioBackendInfo
If a backend can be loaded, it does not mean that it can be used;
e.g. weak-linked jack-backend if libjack is not available.
2014-10-23 16:53:14 +02:00
68458cde69 fix all 4 backends' failure to include the main "backend" thread when computing ::in_process_thread() 2014-10-22 17:07:11 -04:00
32e05fa640 update backends for API change in 8d59afb048 2014-10-01 03:24:54 +02:00
99a484f193 ALSA backend: initial device selection 2014-09-24 01:26:51 +02:00
b1da9af8de ALSA|Dummy: ignore port unregistration when engine is stopped
When changing Engine parameters, ardour first stops
the engine and only later when re-etablishing ports
unregisters/re-registers them.

ALSA: silently ignore port unregs and silently accept registrations
Dummy: print a PBD::info message,
2014-09-08 01:25:56 +02:00
dc318e6e74 ALSA|Dummy Backend: do as jack does:
when the backend is closed, unregister all ports.
2014-09-07 22:50:57 +02:00
cd12698b9c Rename PBD::find_file_in_search_path to just PBD::find_file
saves a bit of typing and not necessary if you look at how it is used.
2014-06-25 12:40:10 -04:00
07fafac36e don't let enumerated device list strings go out of scope. 2014-06-23 12:16:35 +02:00
fb51bdb892 statically allocate midi-options
fixes possible segfault when the data in the vector
goes out of scope due to RVO.
2014-06-23 11:56:58 +02:00
16ffff10cd ALSA-backend: dedicated Midi-Buffer n-periods (only use for HW output) 2014-06-22 18:28:24 +02:00
6648074a13 virtual abstraction of Alsa Raw+Seq 2014-06-21 13:51:46 +02:00
5e436fc8fc prepare ALSA sequencer 2014-06-21 11:51:11 +02:00
bc67e47048 rework raw-midi drain strategy (workaround for sync devices) 2014-06-19 19:44:14 +02:00
e426c603b6 remove debug output 2014-06-16 23:58:52 +02:00
019e987944 more alsa-midi debugging 2014-06-16 22:08:52 +02:00
ff39a42581 ALSA backend: set latencies to zero when measuring latency 2014-06-13 13:51:42 +02:00
ecb92f474f update ALSA backend, MIDI device config 2014-06-13 12:02:03 +02:00
da912f7ed4 add AudioEngine API to configure individual MIDI devices 2014-06-13 11:47:51 +02:00
8fe593fcca some misc tweaks to the ALSA Backend 2014-06-08 21:04:30 +02:00
b3a44ea32b ALSA Backend: align midi output buffer with n_periods (currently 2) 2014-06-08 15:53:15 +02:00
8f17b7c309 ALSA backend: separate systemic audio+midi latency 2014-06-07 17:28:47 +02:00
c452cd9be2 ALSA rt-thread priority fixes 2014-06-07 17:28:46 +02:00
b68d2e25b2 ALSA backend: prevent possible crash destruction of a-r-d 2014-06-07 17:28:46 +02:00
960a5347f0 ALSA & Dummy: implement port [un]registration_callback 2014-06-07 17:28:46 +02:00
d7fc573cb8 alsa + dummy backend, proper [re]initialization 2014-06-06 03:43:39 +02:00
1c87f6adec properly setup port system latency for Dummy & ALSA backend 2014-06-06 00:58:11 +02:00
748c137461 pass ardour's pid to the device reservation script.
terminate a-r-d when ardour crashes or exits unexpectedly.
2014-06-05 19:49:23 +02:00
8d6183bff5 ALSA backend: require both in+output. 2014-06-05 03:27:19 +02:00
822c460d15 DBus ALSA device reservation 2014-06-05 02:22:13 +02:00
a907d3455e break out ALSA related functions into libardouralsautil 2014-06-04 19:16:37 +02:00
40cfe86569 ALSA: tentative hack to request audio-device. 2014-06-04 17:17:15 +02:00
6b781f72f2 ALSA backend: engine.halted_callback if the process thread dies 2014-06-04 17:17:15 +02:00
aec7ea4613 Revert "Revert "ALSA backend: separate flags for is-running and should-be-running""
sorry, c/p error
This reverts commit 9658b77327.
2014-06-04 02:39:39 +02:00
9658b77327 Revert "ALSA backend: separate flags for is-running and should-be-running"
Theoretically one could alter the plugins after a delivery even on a
frozen track. ..or even change settings, the ordering and add/remove
plugins after the frozen part of a track.

We won't go there. Frozen is frozen. this API is not needed after all.

This reverts commit 6d89488d64.
2014-06-04 02:34:58 +02:00
6d89488d64 ALSA backend: separate flags for is-running and should-be-running 2014-06-04 02:23:41 +02:00
03cb44f814 ALSABackend: elaborate on start-up error cases 2014-06-04 02:19:46 +02:00
01cedf0e05 ALSA backend: tweak midi parser (fix start mid sequence) 2014-06-03 01:00:58 +02:00
b050f91323 ALSA backend: device detection 2014-06-03 00:50:26 +02:00
c79a56a08f ALSA backend: add raw midi parser 2014-06-02 19:23:07 +02:00
5cd2010c79 ALSA backend: raw midi prototype 2014-06-02 19:23:07 +02:00
8e9b02cfa2 ALSA backend (based on Dummy backend and zita-alsa-pcmi) 2014-06-02 19:23:07 +02:00