summaryrefslogtreecommitdiff
path: root/libs
AgeCommit message (Collapse)Author
2012-01-05possibly fix deadlocking issues with tempo map by rearranging code and ↵Paul Davis
adding RT variants for a couple of functions that would normally try to rebuild the map when necessary; instead the variants throw an exception and the RT code that called them tries to do something reasonable git-svn-id: svn://localhost/ardour2/branches/3.0@11164 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-04Use Request::Pause rather than Request::Wait forCarl Hetherington
Butler::wait_until_finished. Otherwise the following bad thing happens: 1. The export code wants to call some Butler functions, so it calls calls Butler::wait_until_finished. 2. This (used to) write Request::Wake into the butler's request pipe. 3. Imagine that when this happens, the butler is already doing stuff. 4. Meanwhile, Butler::wait_until_finished is waiting on Butler::paused. 5. Some time later, the butler finishes its other stuff. 6. Then it signals "paused". 7. This causes Butler::wait_until_finished to return, so the export code thinks everything's ok and starts calling butler functions. 8. Then the butler sees the Request::Wake, wakes up, and by unhappy coincidence ends up calling read on the same diskstream that the export code has just called. This causes corruption of the Diskstream buffers, resulting in mantis #4283. Using Request::Pause instead means that the butler will still wake in step #8, but should_run will be false, so nothing much will happen and the export code will be unimpeded. For future reference, this bug was easiest to track down after adding a debugging mutex to AudioDiskstream and then try-locking it in AudioDiskstream::_do_refill; as far as I can see, _do_refill should never be called by two threads at the git-svn-id: svn://localhost/ardour2/branches/3.0@11163 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-04try to clean up locking issues with TempoMapPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@11161 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-04fix error in framepos_{plus,minus}_bbt() which miscounted beats while ↵Paul Davis
stepping through bars - stops dragged MIDI notes from ending up in the wrong place, and more git-svn-id: svn://localhost/ardour2/branches/3.0@11159 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-04fix (?) tricky locking issues in the tempo map by adding a second lock and ↵Paul Davis
independently locking the metrics and the map itself git-svn-id: svn://localhost/ardour2/branches/3.0@11157 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-04Use a few shared_ptrs to make things slightly neater.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11156 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-04implement TempoMap::framepos_minus_beats() using new bar|beat map structure, ↵Paul Davis
and fix accuracy of TempoMap::framepos_plus_bbt() git-svn-id: svn://localhost/ardour2/branches/3.0@11155 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-04use BBTPoint::is_bar() rather than ::beat == 1 ; implement ↵Paul Davis
TempoMap::framepos_plus_{beats,bbt}() with new map structure (not totally finished or accurate yet); prevent crash when dragging a marker to replace the initial tempo/meter markers git-svn-id: svn://localhost/ardour2/branches/3.0@11154 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03Remove unused variables.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11153 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03Maybe fix initial run of tests with sources.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11152 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03Add valgrind option for tests.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11150 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03Add TestNeedingPlaylistAndRegionsCarl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11149 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03remove duplicated test conditionsPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@11148 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03save 4 bytes per Bar|Beat point in the tempo mapPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@11147 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03return two iterators into the Bars|Beats list of the tempo map rather than ↵Paul Davis
making a copy; use iterators in the GUI git-svn-id: svn://localhost/ardour2/branches/3.0@11146 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03more tempo fixes, including handling multiple metrics at the same place, and ↵Paul Davis
fixing round_to_beat_subdivision(). almost done now... git-svn-id: svn://localhost/ardour2/branches/3.0@11145 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03fix incorrect tempo testPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@11144 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03remove body of no-longer-relevant tempo-related testPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@11143 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03add support for -D foobar when running testsPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@11142 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03Add TestNeedingSession and add missing tempo_test.hCarl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11140 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03New test.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11139 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03More test friends.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11138 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03Reverse parameters to CPPUNIT_ASSERT_EQUAL so its assertCarl Hetherington
messages read the right way round. git-svn-id: svn://localhost/ardour2/branches/3.0@11137 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03Fix erroneous test.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11136 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03Remove unused variables.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11135 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03Fix test build.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11134 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03Reverse parameters to CPPUNIT_ASSERT_EQUAL so its assertCarl Hetherington
messages read the right way round. git-svn-id: svn://localhost/ardour2/branches/3.0@11133 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-02Use the correct flag for DAZ and default to using FTZ and DAZ denormal ↵Carl Hetherington
protection. git-svn-id: svn://localhost/ardour2/branches/3.0@11132 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-02intermediate commit as all tempo/meter stuff starts to walk the precompute ↵Paul Davis
Bars|Beats list. Still have ::round_to_beat_subdivision() to fix. haven't really done any thorough testing at this point, but basic stuff seems OK git-svn-id: svn://localhost/ardour2/branches/3.0@11131 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-02new approach to tempo/meter: compute and store the entire map (every ↵Paul Davis
bar|beat point), thus enabling us to use the same computation to set the BBT points AND the metric markers (tempo + meter) on the audio timeline. It is known that snapping to the BBT grid doesn't work correctly right now, but this probably caused by the separate code in TempoMap::round_to_type() and i'll dig into that tomorrow. Note that the Bar|beat point list is evaluated "lazily" - we'll never store more than anyone actually needs to display or know, other than 1 minute's worth starting from frame zero git-svn-id: svn://localhost/ardour2/branches/3.0@11129 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-31Emit notify_layering_changed() more often; especially when we remove the ↵Carl Hetherington
only region on a top layer, and the StreamView needs to sort itself out. git-svn-id: svn://localhost/ardour2/branches/3.0@11126 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-31Don't round control list events when x-scaling them; prevents large loss of ↵Carl Hetherington
accuracy with xfades when they are scaled to be small and then expanded again (#4602). git-svn-id: svn://localhost/ardour2/branches/3.0@11125 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-30Anywhere that deletes regions needs to use a rdiff() on the playlistCarl Hetherington
for the undo history, so that changes to regions' layering_index get stored in the undo record. Make Playlist::update use add_region_internal so that undone regions don't have their layering_index corrupted. Setup layering indices on relayer() so that deletion of regions causes an update. git-svn-id: svn://localhost/ardour2/branches/3.0@11123 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-30Debug code.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11122 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-30Set up layering_index immediately on an explicit layer, so that undoCarl Hetherington
works properly. Stop the layer being a stateful property, as it is always derived from layering_index, unambigiously, by relayer(). git-svn-id: svn://localhost/ardour2/branches/3.0@11120 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-30Add assert.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11119 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-30fix default response behaviour of Gtkmm2ext::Prompter (from colinf)Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@11112 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-29Revert internals of the last layering-related commit, and go back a ↵Carl Hetherington
slightly-cleaned-up version of how it was before. Remove all layering modes; only option now is add-is-higher. Move-add-higher could easily be re-added if anyone uses it. git-svn-id: svn://localhost/ardour2/branches/3.0@11111 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-29clean up comments and commented codePaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@11110 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-29next iteration of tempo map stuff - fixes off-by-one issues with bar ↵Paul Davis
offset<->beat math git-svn-id: svn://localhost/ardour2/branches/3.0@11109 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-28a huge set of changes to tempo+meter handling. testing feedback requested. ↵Paul Davis
the_CLA, you know who i mean :) git-svn-id: svn://localhost/ardour2/branches/3.0@11103 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-28new DEBUG_ENABLED(bits) macro, potentially useful here and therePaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@11102 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-28Remove unused variable.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11101 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-27Try to make new layering stuff play nicely with undo.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11097 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-27Hack around one case where satisfying all constraints in aCarl Hetherington
relayer is impossible. git-svn-id: svn://localhost/ardour2/branches/3.0@11096 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-27More debugging.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11095 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-27Improve debug slightly and fix raise/lower.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11094 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-27Fix up confusion with relayering after movement drags inCarl Hetherington
overlaid mode. git-svn-id: svn://localhost/ardour2/branches/3.0@11092 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-27Basic DEBUG_TRACE for layering code.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11091 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-27Re-work layering in possibly debatable ways. Sketchy docs in doc/layering.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11088 d708f5d6-7413-0410-9779-e7cbd77b26cf