Paul Davis
b35518e212
switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
...
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Robin Gareus
25d1209bb4
Only dump SessionEvent pool in debug builds
...
This ensures that the user will see a "POOL OUT OF MEMORY" message.
In rare case dumping the pool can segfault when printing the Event,
The pool is zero initialized and only ever contains events, so
in theory it is safe to print them..
2022-07-07 22:34:11 +02:00
Robin Gareus
a8a4695466
Dump SessionEvent cross-thread pool when it overflows
2022-07-07 05:21:44 +02:00
Robin Gareus
03e0fe0a73
Add API to query Session event pool size
2022-06-09 00:41:23 +02:00
Robin Gareus
0db261cf64
Merge Overwrite request for the track
...
Previously events with different reasons where treated as two
separate events. Processing an Overwrite request causes
post-transport-work to set.
Since ::non_realtime_work_pending() is true, process_event()
is not called, and no further immediate events are evaluated in
the same cycle.
So Overwrite requests were repeated over multiple cycles.
2022-02-05 19:04:22 +01:00
Paul Davis
fd2f2f46cc
triggerbox: implement cue-triggering session event handling (sync with location markers)
...
Still requires handling tempo changes
2022-01-05 13:27:47 -07:00
Robin Gareus
8642f5476d
Ensure that immediate events are not accidentally replaced
...
All Immediate events have the same action samples, while other
parameters differ. Those events must not be removed by a
call to _remove_event(), particularly not SessionEvent::Overwrite
2021-05-12 19:24:04 +02:00
Robin Gareus
5957e14259
Remove unused #include<> (2/2)
...
PBD::stacktrace() is not used nor needed by default.
It should be used sparingly.
2021-05-05 17:57:16 +02:00
Robin Gareus
bbb244c1c9
Implement replacing events in the immediate queue
...
This corrects issues introduced in a75c239c0c
,
and fixes MIDI playback.
2021-03-24 04:05:35 +01:00
Robin Gareus
a75c239c0c
Do not accumulate SessionEvent::Overwrite events #8576
2021-03-22 02:54:42 +01:00
Paul Davis
bd229936ec
add finite state machine to control/manage transport state
2019-09-17 18:26:03 -06:00
Robin Gareus
a22f918d9d
Update libardour GPL boilerplate and (C) from git log
2019-08-03 15:53:16 +02:00
Robin Gareus
2953b575f2
Remove unused AutoLoopDeclick, PendingLoopDeclick
...
The flags were set, but not used. They also won't be needed anymore.
2018-07-09 17:30:38 +02:00
Paul Davis
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
Paul Davis
144f95c305
do not queue multiple Locate or LocateRoll events
2017-09-18 11:40:53 -04:00
Paul Davis
cf52d6e4b4
enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h
2016-07-14 14:45:23 -04:00
Robin Gareus
22b07e0233
NOOP, remove trailing tabs/whitespace.
2015-10-05 16:17:49 +02:00
Paul Davis
4dc63966f0
globally remove all trailing whitespace from ardour code base.
...
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
Paul Davis
480f1e4082
noop: fix indentation/whitespace
2015-06-29 14:18:14 -04:00
GZharun
ef59fbffa1
[Summary] Added possibility to identify IO thread which does not have required resources initialized during process callback handling
...
Conflicts:
libs/ardour/ardour/audioengine.h
libs/backends/wavesaudio/waves_audiobackend.cc
libs/pbd/pbd/pool.h
2015-06-29 14:16:42 -04:00
Paul Davis
cc543280d9
We were 2 more debug "bits" away from overflow, so recast PBD::DEBUG mechanism away from a 64bit integer and toward std::bitset.
...
Clean up a few minor related PBD::DEBUG issues along the way
2015-06-12 18:14:09 -04:00
Robin Gareus
fe85575a12
fix “no per-thread pool” abort
...
For some backends the process thread can change (e.g.
switch coreaudio headphone + internal speakers)
If there are existing x-thread event calls this can lead to
the following situation:
1) SessionEvent::operator new
2) audioengine process thread change
3) SessionEvent::operator delete -> crash, wrong thread
SessionEvent::operator delete can safely push the event back to
the pool for later cleanup..
2015-03-11 00:25:10 +01:00
Paul Davis
78e245d0b5
do not attempt to call an empty/null boost functor in clear_events()
2015-02-05 18:03:40 -05:00
Paul Davis
6790f8342a
expand SessionEvent API to allow ::clear_events() to work correctly.
...
clear_events() must run in realtime context, which is likely to be asynchronous
with respect to the thread that calls it. So allow caller to pass in a functor
that will be executed (also in realtime context) after the clear is done.
Additionally, allow for a cross-thread callback to the event loop/thread which
initiated/allocated the clear event request so that it can flush its own pending
loop. This part probably isn't necessary but doesn't hurt and is a useful model.
The event would be placed back in the free list at the next event allocation
by the calling thread anyway.
2015-02-05 16:32:21 -05:00
Paul Davis
76d42ab644
change SessionEvent::Immediate to -1, and ensure that clear_events() uses it rather than a hard-coded value
...
This fixes a design error of using zero as the flag for an "Immediate" event's action frame. Zero
is a perfectly legitimate action frame for an event (e.g. a Skip event), and using zero was causing
skip events with action-frame == 0 to be treated as immediate, not scheduled.
2014-12-21 11:45:53 -05:00
Paul Davis
446a8b69d9
make output of SessionEventManager::dump_events() a bit more readable
2014-10-10 13:22:50 -04:00
John Emmas
796f6e1302
Re-validate our iterator after SessionEventManager removes an event
2014-03-18 19:23:28 +00:00
Paul Davis
5d125e1eae
Use PBD::pthread_name in debug output
2013-07-11 14:58:00 -04:00
Carl Hetherington
7a76e8ae96
Declick before the end of seamless loops, not after the end, so that loops are rendered accurately ( #4213 , #4593 ).
...
git-svn-id: svn://localhost/ardour2/branches/3.0@12801 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-20 18:46:05 +00:00
David Robillard
6fa6514cfd
Remove over 500 unnecessary includes (including 54 of session.h).
...
It's slightly possible that this causes trivial build failures on different
configurations, but otherwise shouldn't cause any problems (i.e. no actual
changes other than include/naming/namespace stuff). I deliberately avoided
removing libardour-config.h since this can mysteriously break things, though a
few of those do seem to be unnecessary.
This commit only targets includes of ardour/*.h. There is also a very large
number of unnecessary includes of stuff in gtk2_ardour; tackling that should
also give a big improvement in build time when things are modified.
git-svn-id: svn://localhost/ardour2/branches/3.0@12420 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24 06:09:29 +00:00
David Robillard
a473d630eb
Fix broken whitespace. I'd apologize for the compile times if it was my fault :D
...
git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-01 16:50:12 +00:00
David Robillard
62e730b57a
Fix broken whitespace (no functional changes).
...
git-svn-id: svn://localhost/ardour2/branches/3.0@9288 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-04-04 22:46:48 +00:00
Paul Davis
2ad819c956
deeper debug stracktrace
...
git-svn-id: svn://localhost/ardour2/branches/3.0@9046 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-03-02 22:15:59 +00:00
Paul Davis
c8e5e9d425
actual debug stracktrace added
...
git-svn-id: svn://localhost/ardour2/branches/3.0@9045 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-03-02 22:02:03 +00:00
Paul Davis
4071286bfa
debug stracktrace added
...
git-svn-id: svn://localhost/ardour2/branches/3.0@9044 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-03-02 21:28:25 +00:00
Carl Hetherington
bee34078e7
Use DEBUG macros for SessionEvent debugging.
...
git-svn-id: svn://localhost/ardour2/branches/3.0@8482 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-01-08 15:19:32 +00:00
Paul Davis
fde57da354
yet more debugging for thread pools
...
git-svn-id: svn://localhost/ardour2/branches/3.0@8451 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-01-06 00:01:33 +00:00
Paul Davis
9541129651
event pool allocation debugging
...
git-svn-id: svn://localhost/ardour2/branches/3.0@8434 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-01-04 16:55:52 +00:00
Paul Davis
ede4ecbb00
megaopus patch #2 for today: remove nframes64_t and sframes_t from source
...
git-svn-id: svn://localhost/ardour2/branches/3.0@7792 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-17 18:20:37 +00:00
Paul Davis
c11c01ef20
remove a bunch of uses of long (mostly replaced by int32_t)
...
git-svn-id: svn://localhost/ardour2/branches/3.0@7472 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-22 16:08:11 +00:00
Paul Davis
9686f8097d
first pass at end-to-end RT operation request (GUI->session->RT thread->GUI), just for rec-enable
...
git-svn-id: svn://localhost/ardour2/branches/3.0@6324 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-07 21:37:35 +00:00
Paul Davis
8dab33c609
Route::set_meter_point() is now conceptually RT safe, although it still takes a write lock on the processor list. this allows it to be called when setting rec-enable status on a route. not thoroughly tested, and still incomplete - single route rec-enables should probably use this pathway, and there is still no cross-thread cleanup from an RT route op request
...
git-svn-id: svn://localhost/ardour2/branches/3.0@6320 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-07 14:18:06 +00:00
Paul Davis
4a3d7877f6
cross-thread handling of SessionEvent allocation/deallocation, with widespread consequences
...
git-svn-id: svn://localhost/ardour2/branches/3.0@6283 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-04 19:24:09 +00:00
Paul Davis
9ad2875905
move Session::Event into SessionEvent class; add SessionEventManager (Session IS-A SessionEventManager); make session ops to toggle all track rec-enable be atomic with respect to process()
...
git-svn-id: svn://localhost/ardour2/branches/3.0@6273 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-04 02:15:12 +00:00
Paul Davis
03c74e45a8
more tweaks to MTC slave code (still not functional), including removing race conditions when resetting slave state; make Session catch on its own saved preferences, which has not been happening; make switching sync sources avoid race conditions
...
git-svn-id: svn://localhost/ardour2/branches/3.0@6269 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-03 18:44:06 +00:00
Paul Davis
6a847f553c
add slave,transport and event debugging traces
...
git-svn-id: svn://localhost/ardour2/branches/3.0@6215 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-11-30 16:12:13 +00:00
Paul Davis
498dfebcca
90% done with external sync design changes (GUI now has toggle switch for ext/int sync; source chosen separately, currently in ardour prefs dialog ; fix libmidi++ and compilation scripts to correctly build JACK+ALSA support; minor contiuing tweaks on transport stuff
...
git-svn-id: svn://localhost/ardour2/branches/3.0@6048 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-11-09 20:05:18 +00:00
Paul Davis
ff122d0fe8
monster commit: transport mgmt changes from 2.X (omnibus edition); make slave use nframes64_t ; avoid crashes in Drags when commiting reversible transactions that do not exist
...
git-svn-id: svn://localhost/ardour2/branches/3.0@6034 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-11-08 16:28:21 +00:00
Paul Davis
e98b3c1ec6
make 3.0 catch up with transport and other changes in 2.X (hand applied, not merged)
...
git-svn-id: svn://localhost/ardour2/branches/3.0@5989 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-30 18:14:25 +00:00
Paul Davis
fa5aeb7892
change the use of "SMPTE" to "Timecode" to reflect the global economy and the end of american dominance on the world audio production stage
...
git-svn-id: svn://localhost/ardour2/branches/3.0@5924 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-26 14:38:58 +00:00