summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_port.cc
AgeCommit message (Collapse)Author
2018-09-18new transport slave/master implementation, libs/ editionPaul Davis
2017-10-30remove non rt-safe debug messagesRobin Gareus
2017-10-29Remove unused per-port buffer offsetRobin Gareus
2017-10-29Move vari-speed into backend (resample ports)Robin Gareus
Previously Ardour used a /local/ per track vari-speed mechanism. Now that the disk-reader is a latency-compensated processor, the speed of each disk-reader would need to be maintained locally, offset by each disk-reader's output latency. Furthermore each disk-reader may produce a different number of samples, depending on its global alignment. This commit introduces port-data resampling directly at the engine-level: Up/down-sample all input ports at the beginning, and down/up-sample output port-data using the inverse ratio at the end of the session's process cycle. The session itself is unaware of the speed-change, and only needs to handle transport speeds {-1, 0, +1}. This also allows for aligned cue-monitoring and vari-speed recording, and also pitch-shifts synthesized MIDI along.
2017-08-03Some more assert() debuggingRobin Gareus
2017-08-03Ignore cycle-start/end for unregistered portsRobin Gareus
Should fix a race during Session::destroy(), Port::PortDrop which unregisters ports with the backend, but the actual port instance will still exist. The engine does no longer have a session-pointer and only calls CycleStart(); CycleEnd() to clear port-buffers. Trying to clear and already unregistered Port will crash.
2016-07-20tentative fix for a crash that occurs when switching backends.5.0-pre1Paul Davis
Session::process() returns early with Session::_silent set to true. AudioBuffer::set_data() was never set for (at least) the LTC output port. PortManager::cycle_end() calls AudioBuffer::silence() which used to assume that get_buffer() must have been called. But it was not, because that should have happened in Session::process(). So check AudioBuffer::data() and call get_buffer() if required.
2015-10-04globally remove all trailing whitespace from ardour code base.Paul Davis
Paul Davis was responsible for introducing almost all of this.
2013-11-29fix up a bunch of confusion regarding the size/capacity/allocation of audio ↵Paul Davis
& midi buffers
2013-07-24part-way through getting the audioengine changes to compilePaul Davis
2012-06-21smooth 0.5 second fade out during quit, plus MIDI panic to turn everything ↵Paul Davis
off (someone will want an opton for that, no doubt) git-svn-id: svn://localhost/ardour2/branches/3.0@12814 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24Remove over 500 unnecessary includes (including 54 of session.h).David Robillard
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
2011-09-30fixes for 98% of all the warnings/errors reported by OS X gcc on tigerPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@10179 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
2011-05-29clarify some confusion about how "raw" port buffer sizes are definedPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@9628 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-03-14Fix assert failure when cycle_end is called by AudioEngine::set_session ↵Carl Hetherington
before the buffer is set up. git-svn-id: svn://localhost/ardour2/branches/3.0@9143 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-03-11sorta-kinda working latency compensation, latency reporting and capture ↵Paul Davis
alignment ... working except that we report the wrong information to JACK and i've noticed a couple of odd circumstances where turning on a latent plugin caused punch recording to fail git-svn-id: svn://localhost/ardour2/branches/3.0@9121 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-03-07manage Route::_have_internal_generator more accurately and never flush ↵Paul Davis
processors if there is on; correctly manage declicking so that only *TRACKS* without internal generators will declick at transport state transitions (fixes horrible click at transport stop in some configurations git-svn-id: svn://localhost/ardour2/branches/3.0@9100 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-03-07fix all manner of wrongness with port buffer offsetsPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@9098 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-08-13Move _port_offset up to AudioPort, as MidiPort does not use it.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7614 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-09basically, fix all kinds of odds and ends with MIDI playback, including ↵Paul Davis
missed notes and applying gain git-svn-id: svn://localhost/ardour2/branches/3.0@7247 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-14Strip trailing whitespace and fix other whitespace errors (e.g. space/tab ↵David Robillard
mixing). Whitespace changes only. Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent... git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-04Preliminary MIDI plugin support.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5036 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-04-23remove offset from process callback tree. some breakage may have occured. ↵Paul Davis
yes, really. git-svn-id: svn://localhost/ardour2/branches/3.0@4999 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-25*** NEW CODING POLICY ***David Robillard
All #include statements that include a header that is a part of a library bundled with ardour MUST use quotes, not angle brackets. Do this: #include "ardour/types.h" NOT this: #include <ardour/types.h> Rationale: This is best practice in general, to ensure we include the local version and not the system version. That quotes mean "local" (in some sense) and angle brackets mean "system" (in some sense) is a ubiquitous convention and IIRC right in the C spec somewhere. More pragmatically, this is required by (my) waf (stuff) for dependencies to work correctly. That is: !!! FAILURE TO DO THIS CAN RESULT IN BROKEN BUILDS !!! Failure to comply is punishable by death by torture. :) P.S. It's not that dramatic in all cases, but this (in combination with some GCC flags specific to the include type) is the best way I have found to be absolutely 100% positive the local ones are being used (and we definitely want to be absolutely 100% positive on that one). git-svn-id: svn://localhost/ardour2/branches/3.0@4655 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-11Remove internal ports.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@4525 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-01-30first pass at internal sends. this is a very tentative work in progress, and ↵Paul Davis
it is possible that major changes may follow in the near future. it is certainly not complete, but the fundamental changes to Port/Buffer operation merit a commit at this point git-svn-id: svn://localhost/ardour2/branches/3.0@4464 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-01-21Rework Port class hierarchy a bit. Hopefully now simpler, and shouldCarl Hetherington
support connection of JACK ports with internal ones. git-svn-id: svn://localhost/ardour2/branches/3.0@4417 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-12-18Remove unnecessary 0 checks before delete; see ↵Carl Hetherington
http://www.parashift.com/c++-faq-lite/freestore-mgmt.html#faq-16.8 Apologies for the big commit. git-svn-id: svn://localhost/ardour2/branches/3.0@4332 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-10-08torben's port buffer reworking; torben's panner automation loading patch ↵Paul Davis
(allows loading of 2.X sessions) git-svn-id: svn://localhost/ardour2/branches/3.0@3890 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-06-02rollback to 3428, before the mysterious removal of libs/* at 3431/3432Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@3435 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-06-02remove empty sigc++2 directoryDoug McLain
git-svn-id: svn://localhost/ardour2/branches/3.0@3432 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-01-10Merge libs/ardour and gtk2_ardour with 2.0-ongoing R2837.David Robillard
git-svn-id: svn://localhost/ardour2/trunk@2883 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-31new port design, probably about 90% done (i.e it mostly works and this ↵Paul Davis
commit is to stop anyone else from stomping on my changes :) git-svn-id: svn://localhost/ardour2/trunk@2579 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-25Clean/strengthen up constructor/type stuff in new port system.David Robillard
git-svn-id: svn://localhost/ardour2/trunk@2572 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-23Re-work Port construction slightly so that _flags is always initialised ↵Carl Hetherington
before reset() is called. Otherwise a decision is made based on an uninitialised variable (as spotted by valgrind) git-svn-id: svn://localhost/ardour2/trunk@2568 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-17new internal port type, round I, plus tiny fix for legalize_for_xml() (also ↵Paul Davis
for 2.0-ongoing) git-svn-id: svn://localhost/ardour2/trunk@2559 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-10-16virtualize Port object; clean up automation tracks from track deletionPaul Davis
git-svn-id: svn://localhost/ardour2/trunk@2556 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-05-03optimize some performance bottlenecks; remove jack_nframes_t that crept back ↵Paul Davis
into the code git-svn-id: svn://localhost/ardour2/branches/midi@1779 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-09-01Fixes for IO port adding/removingDavid Robillard
Working audio sends/port inserts Send gain, panning MIDI sends working (maybe port inserts too?) Buffer/Port fixes (related to silence) Metering bug fixes git-svn-id: svn://localhost/ardour2/branches/midi@883 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-08-12Towards MIDI:David Robillard
- Converted vector<Sample*> to BufferList and numerous counts from int to ChanCount (and related changes) - Added fancy type-generic iterators to BufferList, PortIterator (see IO::collect_input for a good example of the idea - the same code will work to read all input (of various types in a single IO, eg instruments) without modification no matter how many types we add) - Fixed comparison operator bugs with ChanCount (screwed up metering among other things) - Moved peak metering into it's own object, and moved most of the pan related code out of IO to panner (still a touch more to be done here for MIDI playback) Not directly MIDI related fixes for problems in trunk: - Fixed varispeed gain/pan automation to work properly (was reading the wrong range of automation data, probably causing nasty clicks?) - Fixed crash on varispeed looping (possibly only a 64-bit problem). It still doesn't work, but at least it doesn't die Quite a few things broken, and the new classes are pretty filthy still, but I think the direction is a lot better than all my previous plans... git-svn-id: svn://localhost/ardour2/branches/midi@795 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-08-11- Changed IO's vector<Port*>'s to PortListDavid Robillard
- Added new Port classes, code to drive them - Added PortList, which is a filthy mess ATM (nevermind that, it's the interface that's important at this stage) - Added ChanCount, though it isn't very thoroughly used yet. That's the next step.... - Fixed a few bugs relating to loading sessions saved with trunk - Fixed a few random other bugs Slowly working towards type agnosticism while keeping all the former code/logic intact is the name of the game here Warning: Removing ports is currently (intentionally) broken due solely to laziness. git-svn-id: svn://localhost/ardour2/branches/midi@786 d708f5d6-7413-0410-9779-e7cbd77b26cf