summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/session_event.h
AgeCommit message (Collapse)Author
2020-04-12Fix loop range changes while playing - #8001Robin Gareus
Since ead883302fe800ae, it is no longer possible to use a null pointer SessionEvent::track as flag to indicate overriding all buffers.
2020-03-28Don't use shared-pointers in cross thread event structsRobin Gareus
This fixes a deadlock when closing the session. Session::destroy() takes the engine-lock while removing unhandled session-events. In [1], the event-queue held a last reference to a Track, and releasing that object triggered events (here ~IO) that required the lock. --- [1] #2 0x0041743a in Glib::Threads::Mutex::Lock::Lock at /home/ardour/linux-armhf/stack/include/glibmm-2.4/glibmm/threads.h:643 #3 0xb67433ba in ARDOUR::IO::~IO at ../libs/ardour/io.cc:105 #4 0xb6743612 in ARDOUR::IO::~IO at ../libs/ardour/io.cc:111 #5 0xb6758e66 in boost::checked_delete<ARDOUR::IO> at /home/ardour/linux-armhf/stack/include/boost/core/checked_delete.hpp:34 #6 0xb675912c in boost::detail::sp_counted_impl_p<ARDOUR::IO>::dispose at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_impl.hpp:92 #7 0x004178d8 in boost::detail::sp_counted_base::release at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_base_sync.hpp:129 #8 0x00417986 in boost::detail::shared_count::~shared_count at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/shared_count.hpp:426 #9 0xb662343a in boost::shared_ptr<ARDOUR::IO>::~shared_ptr at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/shared_ptr.hpp:341 #10 0xb6a4af7a in ARDOUR::Route::~Route at ../libs/ardour/route.cc:282 #11 0xb6b9404c in ARDOUR::Track::~Track at ../libs/ardour/track.cc:71 #12 0xb697164a in ARDOUR::MidiTrack::~MidiTrack at ../libs/ardour/midi_track.cc:94 #13 0xb697177a in ARDOUR::MidiTrack::~MidiTrack at ../libs/ardour/midi_track.cc:96 #14 0xb6ac525a in boost::checked_delete<ARDOUR::MidiTrack> at /home/ardour/linux-armhf/stack/include/boost/core/checked_delete.hpp:34 #15 0xb6acde00 in boost::detail::sp_counted_impl_p<ARDOUR::MidiTrack>::dispose at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_impl.hpp:92 #16 0x004178d8 in boost::detail::sp_counted_base::release at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_base_sync.hpp:129 #17 0x00417986 in boost::detail::shared_count::~shared_count at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/shared_count.hpp:426 #18 0xb664dca6 in boost::shared_ptr<ARDOUR::Track>::~shared_ptr at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/shared_ptr.hpp:341 #19 0xb6aaf67e in ARDOUR::SessionEvent::~SessionEvent at ../libs/ardour/ardour/session_event.h:42 #20 0xb6a91a88 in ARDOUR::Session::destroy at ../libs/ardour/session.cc:753 #21 0xb6a8fb20 in ARDOUR::Session::~Session at ../libs/ardour/session.cc:460 #22 0xb6a9075e in ARDOUR::Session::~Session at ../libs/ardour/session.cc:46
2020-01-18Session::request_locate() takes a tri-valued second argument for ↵Paul Davis
"roll-after-locate" This allows callers to defer logic about auto-play/current rolling state and more to TransportFSM where it can be cnentralized and is less ambiguous
2019-12-10revert to single buffer for disk playback, and 5.x-style overwritePaul Davis
Also address issues with MIDI and also atomicity of _pending_overwrite
2019-11-02refactor SessionEvent and DiskIO so that we pass around ↵Paul Davis
boost::shared_ptr<Track> rather than Route (this the raw pointers used inside SessionEvent)
2019-09-17add finite state machine to control/manage transport statePaul Davis
2019-08-03Update libardour GPL boilerplate and (C) from git logRobin Gareus
2018-09-18new transport slave/master implementation, libs/ editionPaul Davis
2018-07-09Remove unused AutoLoopDeclick, PendingLoopDeclickRobin Gareus
The flags were set, but not used. They also won't be needed anymore.
2017-09-29Remove unused punch+preroll APIRobin Gareus
This API was not used, also superseded by record w/preroll.
2017-09-18globally change all use of "frame" to refer to audio into "sample".Paul Davis
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-18remove InputConfigurationChange from session events, since it is a no-op in ↵Paul Davis
this development branch
2017-09-18remove all remaining vestiges of per-track varispeed from libardourPaul Davis
2017-09-16Namespace PBD::RingBufferRobin Gareus
class RingBuffer<> is a very generic name and should not pollute the global namespace.
2017-07-04Fix session-event queue (multiple writer, single reader)Robin Gareus
The reading is done in rt-process thread, but multiple UIs (surfaces, GUI) can produce events to be queued.
2017-01-18Implement record with prerollRobin Gareus
2016-05-31universal change in the design of the way Route/Track controls are designed ↵Paul Davis
and used. The controls now own their own state, rather than proxy for state in their owners. Massive changes all over the code to accomodate this. Many things are not finished. Consider this a backup safety commit
2015-10-05NOOP, remove trailing tabs/whitespace.Robin Gareus
2015-10-04globally remove all trailing whitespace from ardour code base.Paul Davis
Paul Davis was responsible for introducing almost all of this.
2015-06-29noop: fix indentation/whitespacePaul Davis
2015-06-29[Summary] Added possibility to identify IO thread which does not have ↵GZharun
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-02-05expand SessionEvent API to allow ::clear_events() to work correctly.Paul Davis
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.
2014-12-21change SessionEvent::Immediate to -1, and ensure that clear_events() uses it ↵Paul Davis
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-09-17add new Skip event to SessionEventsPaul Davis
2014-07-02add a method to cancel a pending play_range. this is needed when we are ↵Ben Loftis
modifying the range with keyboard commands.
2014-01-10finished merge of cairocanvas with windows and windows+cc branchesPaul Davis
2013-12-02Revert unfinished export visibility commits by John EmmasTim Mayberry
These break the mingw build and the visibility work will make this code redundant
2013-10-17add export visibility macros across libardourPaul Davis
2013-10-15'libs/ardour' - Add 'LIBARDOUR_API' (initial testing). Ensures that ↵John Emmas
libardour classes can get exported and imported from a Windows DLL.
2013-01-16add copyright commentsPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@13864 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-22introduce the idea of a "default transport speed", used whenever ↵Paul Davis
Session::start_transport() is called. Only the shuttle controller alters it, and even that only alters it in wheel mode, which means that stopping the transport does not rever the default speed back to zero. To get back to zero either switch the shuttle controller back to sprung mode, or change the speed back to zero (fixes #451 ... yes, really, a 3 digit bug fixed!) git-svn-id: svn://localhost/ardour2/branches/3.0@12819 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-22fix reset of transport speed when seamless looping; add a few comments and ↵Paul Davis
tidy-ups to related transport code git-svn-id: svn://localhost/ardour2/branches/3.0@12818 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-20Declick before the end of seamless loops, not after the end, so that loops ↵Carl Hetherington
are rendered accurately (#4213, #4593). git-svn-id: svn://localhost/ardour2/branches/3.0@12801 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24Compile cleanly with clang.David Robillard
To compile Ardour with LLVM/clang, do the usual thing but set the CXX and CC environment variables, e.g.: CC=/usr/bin/clang CXX=/usr/bin/clang++ ./waf configure build git-svn-id: svn://localhost/ardour2/branches/3.0@12418 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-01Fix broken whitespace. I'd apologize for the compile times if it was my ↵David Robillard
fault :D git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-03Remove all use of nframes_t.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8166 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-17megaopus patch #2 for today: remove nframes64_t and sframes_t from sourcePaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@7792 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-02Suspend transport timecode transmission during playhead drag. Should fix #3324.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7528 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-22remove a bunch of uses of long (mostly replaced by int32_t)Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@7472 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-09dynamic playback & capture buffer resizing (though transport is stopped first)Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@7250 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-04-21Move Diskstream ownership to Track, so that Session no longer holds lists of ↵Carl Hetherington
Diskstreams. Breaks 3.0 file format again. git-svn-id: svn://localhost/ardour2/branches/3.0@6945 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-04-14Suspend deletion of cross-thread pools until they are empty. Prevents ↵Carl Hetherington
crashes when the freeze thread completes. git-svn-id: svn://localhost/ardour2/branches/3.0@6893 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-23Fix various code quality issues found by cppcheck (e.g. uninitialized ↵David Robillard
members, larger than necessary variable scope, memory leaks, etc). git-svn-id: svn://localhost/ardour2/branches/3.0@6710 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-21fully implement and deploy explicit x-thread signal connection syntax ↵Paul Davis
(testing comes next) git-svn-id: svn://localhost/ardour2/branches/3.0@6379 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-17switch to using boost::signals2 instead of sigc++, at least for libardour. ↵Paul Davis
not finished yet, but compiles, loads sessions, records and can close a session without a crash git-svn-id: svn://localhost/ardour2/branches/3.0@6372 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-11switch to use boost::function for UI::call_slot operations, to avoid a ↵Paul Davis
serious thread safety issue with libsigc++ git-svn-id: svn://localhost/ardour2/branches/3.0@6355 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-10restore rec-enable, solo & mute functionality; remove all Global*Command ↵Paul Davis
cruft; reimplement momentary solo&mute; refactor session RT event stuff to be even cleaner and finally compatible with everything-is-a-UI idea ; make all UIs derive from a primitive type that pprovides only void call_slot (sigc::slot<void>) as a way to execute arbitrary code in the UI thread git-svn-id: svn://localhost/ardour2/branches/3.0@6338 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-07better, cleaner, more generic version of real-time ping pong, still just for ↵Paul Davis
one case of rec-enable but more coming soon git-svn-id: svn://localhost/ardour2/branches/3.0@6325 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-07first pass at end-to-end RT operation request (GUI->session->RT ↵Paul Davis
thread->GUI), just for rec-enable git-svn-id: svn://localhost/ardour2/branches/3.0@6324 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-04cross-thread handling of SessionEvent allocation/deallocation, with ↵Paul Davis
widespread consequences git-svn-id: svn://localhost/ardour2/branches/3.0@6283 d708f5d6-7413-0410-9779-e7cbd77b26cf