13
0
Commit Graph

34966 Commits

Author SHA1 Message Date
luz paz
59320b378f
wscript: fix 'testing equality is none' issue
ref: https://lgtm.com/rules/7900090/
2022-04-08 18:27:10 +02:00
Raphael Isemann
3dfcbf17b2
Fix memory leak in ctorNilPtrPlacementProxy 2022-04-08 18:21:55 +02:00
a1batross
f26257d6e4
wscript: fix Apple-specific flag being added on non-Apple platforms
Although GCC and Clang completely ignore this flag on non-Apple platforms, some "GCC-compatible" compilers may not, like EDG frontend based compilers.
2022-04-08 18:19:54 +02:00
Edgar Aichinger
77fe1c6d32
amend previous commit 2022-04-08 18:17:27 +02:00
Edgar Aichinger
55988b5456
retranslate corrected sourc strings/finish german translation at current state 2022-04-08 18:17:27 +02:00
Edgar Aichinger
13c8af3620
libs/ardour part of german translation 2022-04-08 18:17:27 +02:00
Edgar Aichinger
03e77d9ee0
gtk2_ardour part of german translation 2022-04-08 18:17:27 +02:00
Matthijs van Otterdijk
69bf9d36aa Use integer arithmetic to calculate number of samples per bin 2022-04-08 12:47:44 +02:00
f8dc6d93ec constification: clean up final warning
This explains why we use const_cast<>. We also fix a logic error that
crept in here, in which a source might have its state saved twice
2022-04-07 15:13:30 -06:00
0d82703f8e meterbridge: track size and position via configure events
This allows ::get_state() to be const.
2022-04-07 11:47:13 -06:00
04d34c4061 constification: use const_cast to resolve a CONSTIFICATION warning 2022-04-07 11:27:46 -06:00
ca22ba77e1 Constification: make Stateful::get_state() const, with all other required const-ness added (GUI) 2022-04-06 21:56:59 -06:00
7bf89ce109 Constification: make Stateful::get_state() const, with all other required const-ness added (libs) 2022-04-06 21:56:59 -06:00
9e69c0d184 make use TempoMap::fetch() in RTproc threads more explicit
This also places the call in a more optimal location, right after it is woken
because there is Route processing to be done
2022-04-06 21:56:59 -06:00
2f823164ad
Cont'd "meter/time-signature" disambiguation 2022-04-06 18:21:12 +02:00
dc9eb38a27 Revert "MIDI region view: remove debug/analysis output"
This reverts commit d01ad0b4d4.

These are still useful.
2022-04-05 21:03:05 -06:00
a3c5db5d51 ensure that non-drag track height changes cause a call to Editor::redisplay_track_views() 2022-04-05 20:52:10 -06:00
d01ad0b4d4 MIDI region view: remove debug/analysis output 2022-04-05 20:52:10 -06:00
1999a3aae8 explicitly discard the return value from ::process_redisplay_track_views() 2022-04-05 20:52:10 -06:00
a287499f75 queue ::redisplay_track_views() in an idle handler right after ::idle_resize()
Both of these are currently needed: idle_resize() is required for
::set_height() to take effect on all affected tracks, and
::redisplay_track_views() is needed to reposition all other tracks as
necessary.
2022-04-05 20:52:10 -06:00
c1fb7bc05d we do not need to queue ::redisplay_track_Views() for track height changes
This may be incorrect, since track height changes may be driven
directly (e.g. via menu items) rather than by mouse drags. This may
need revisiting and there may need to be a way to separate dragged height
changes from others.
2022-04-05 20:52:10 -06:00
da20e4ed60 change return type of Editor::process_redisplay_track_views() to bool
This allows it to be used in an idle callback. If we use
::redisplay_track_views() directly, we do not disconnect the idle
connection. This will happen automatically since the callback will return
false, but it seems better to explicit about this. Even better would be to use
::connect_once() but this may not be available in the version of glibmm that we
are using at present.
2022-04-05 20:52:10 -06:00
f2e6798e66 change idle priority of Editor::redisplay_track_views()
It appears that GDK/glib will not run idle callbacks with a lower priority than
HIGH_IDLE+10 *if* a new user input event is pending. This means that if mouse
motion events are arriving and causing resizes of selected tracks, the call
to ::redisplay_track_views() which is needed to update all the other tracks,
will not take place if a new motion event arrives. Changing the priority to
same as is used for the ::idle_resize() callback prevents new motion events
from being handled before ::redisplay_track_views() is called.
2022-04-05 20:52:10 -06:00
f8b0a8843c stash info on whether we disabled region view redisplay for view-only or model changes
The bool may be unnecessary since everywhere we use this seems to be for model changes
2022-04-05 20:52:10 -06:00
c0eb86b586 hide debug iteration inside #ifdef 2022-04-05 20:52:10 -06:00
8410161ae2 remove debug output 2022-04-05 20:52:10 -06:00
6ac9c52b5f remove debug output and some mistakenly commented lines 2022-04-05 20:52:10 -06:00
4fa97e2c50 split midi region view redisplay into two similar methods
::model_changed() is used when the model has changed (eg. new notes or some
notes deleted); ::view_changed() is used when only some view parameter (e.g.
zoom, scroll, track height etc) has been altered.

Not fully functional yet (::view_chanted() ignores scroll)
2022-04-05 20:52:10 -06:00
1a8b80e56e drop experimental use of RegionView::DisplaySuspender during trim drags 2022-04-05 20:52:10 -06:00
0638d3c99e remove use of canvas freeze-queue-draw API
Measurement shows that this makes no actual difference to the speed
of marking up the canvas for a redraw
2022-04-05 20:52:10 -06:00
3ff4d6c5ab some instrumentation for MidiRegionView::redisplay_model() 2022-04-05 20:52:10 -06:00
cc0869d931 restore setting selection in MidiRegionView::redisplay_model() 2022-04-05 20:52:10 -06:00
582661dbd0 as an experiment, prevent redisplay of (MIDI) regions during trimming
This doesn't actually work right now because of a conflicting design in MidiRegionView, but
could be promising. Or it might be reverted
2022-04-05 20:52:10 -06:00
5ec7375884 fix issue with RAII RegionView::DisplaySuspender copy constructor 2022-04-05 20:52:10 -06:00
b8a6b97b49 redesign (MIDI)RegionView display disabling around an RAII model 2022-04-05 20:52:10 -06:00
1d10408bd1 temporal: add some relatively useless code to one of the timeline test functions 2022-04-05 20:52:10 -06:00
fc731419c5 fix potentially incorrect use of strncpy(3) when copying URI for ladspa preset 2022-04-05 20:52:10 -06:00
55752ed8b7 NOOP: blank line deletion 2022-04-05 20:52:10 -06:00
d586956636 NOOP: some minor whitespace fixes 2022-04-05 20:52:09 -06:00
7c6bce5cda fix recursive loop in patch change display
We do not want a loop between ::add_canvas_patch_change() and
::display_patch_changes(), even if it does bottom out in the end
2022-04-05 20:52:09 -06:00
9efdba5b91 comment name of unused function parameter 2022-04-05 20:52:09 -06:00
ae8c043fe1 regionviews: use integer counter instead of boolean to control redisplay of contents 2022-04-05 20:52:09 -06:00
1be72e7a4e NOOP: whitespace for alignment in argument list 2022-04-05 20:52:09 -06:00
3321ae74ab missing changes to MidiAutomationListBinder header file related to 4bc9f9319c014e 2022-04-05 20:52:09 -06:00
892b7b9772 use correct header includes to handle temporal enum conversions 2022-04-05 20:52:09 -06:00
bbfb1bd229 MidiRegion: take reader lock before cloning data into new source 2022-04-05 20:52:09 -06:00
718b3fcfa9 no need for enable_shared_from_this<> in MidiSource 2022-04-05 20:52:09 -06:00
bc38f8d424 MidiSource: change thread mutual exclusion object from Mutex to a RWLock
This allows two reader threads to proceed without blocking each other, as can
happen when the butler renders a MIDI track into an RT-safe buffer while the
GUI reads the same MidiModel/Source for visual display.
2022-04-05 20:52:09 -06:00
1686db8b0c Change the type of reference held by a MidiModel to its MidiSource
This also requires a change in the type of reference held by
a MidiAutomationListBinder.

Both the MidiSource and MidiModel have a reference to each other, and it is
important that we avoid circular references to avoid problems with object
destruction. We had been accomplishing this by having the Model hold a
weak_ptr<MidiSource>. However, the lifetime of a MidiSource and its MidiModel
are coincident and there's really no need to use a smart ptr at all. A normal
reference is just fine. However, due to constructors that accept a serialized
state, we cannot use an actual reference (we cannot set the constructor in the
initializer list), so we use a bare ptr instead.

This forces a similar change in MidiAutomationListBinder, which also maintains
a reference to the Source. However, the only purpose of this object is to
ensure that if the Source is destroyed, relevant commands will be removed from
the undo/redo history, and so all that matters here is that the binder connects
to the Destroyed signal of the source, and arranges for its own destruction
when received.

Note that the previous construction of the binder, actually holding a
shared_ptr<MidiSource> would appear have prevented the Destroyed signal from
ever being emitted (from ~Destructible), and so this may also be a bug fix that
allows MidiSources to actually be deleted (the memory object, not the file).
2022-04-05 20:52:09 -06:00
54597bd803 change the type of reference held by a MidiModel to its MidiSource
This also requires a change in the type of reference held by
a MidiAutomationListBinder.

Both the MidiSource and MidiModel have a reference to each other, and it is
important that we avoid circular references to avoid problems with object
destruction. We had been accomplishing this by having the Model hold a
weak_ptr<MidiSource>. However, the lifetime of a MidiSource and its MidiModel
are coincident and there's really no need to use a smart ptr at all. A normal
reference is just fine. However, due to constructors that accept a serialized
state, we cannot use an actual reference (we cannot set the constructor in the
initializer list), so we use a bare ptr instead.

This forces a similar change in MidiAutomationListBinder, which also maintains
a reference to the Source. However, the only purpose of this object is to
ensure that if the Source is destroyed, relevant commands will be removed from
the undo/redo history, and so all that matters here is that the binder connects
to the Destroyed signal of the source, and arranges for its own destruction
when received.

Note that the previous construction of the binder, actually holding a
shared_ptr<MidiSource> would appear have prevented the Destroyed signal from
ever being emitted (from ~Destructible), and so this may also be a bug fix that
allows MidiSources to actually be deleted (the memory object, not the file).
2022-04-05 20:52:09 -06:00