* Emit signal once midnam was actually updated
* only re-read midnam if was it changed. This allows idempotent calls to
read_midnam() - from the same thread.
At session-load a synth-plugin may load a soundfont in the background
and emit midnam_update() after the synth was initialized but before the
GUI thread connects to the signal. By making the call idempotent the
GUI can call read_midnam() after connecting to the signal to catch up.
When forking regions, copying playlists or saving snapshots we do not
have a reference to the track and cannot use the track's name as basis
for the new filename like Editor::fork_region() does.
A cloned midi region's name is based on the original region name.
This prevents endless addition "name-1-1-1-1-1-1-1-1.mid", adding
to the region's basename.
The queued resize will only happen trigger a size-request when the
widget is realized, and on_size_request() calls ensure_layout().
Moreover, this over protection meant that sometimes a resize wasn't
noticed by the button containers.
pthread-w32 does not support pthread_setschedparam() with
SCHED_FIFO and bails out. While pthread_create() simply ignores the policy
and sets the priority regadless.
This only affects ctrl-surface event-loops & AutomationWatch on Windows.
IO used to manually keep a list of user bundles it was connected to, but
it didn't work correctly: sometimes it didn't notice that a bundle
wasn't connected anymore, and the list wasn't correctly persisted across
save/reloads among other things.
Moreover, it wasn't needed at all, since the user bundles are correctly
listed by _session.bundles() and IO already notices they are connected !
Remove all occurrences of |_bundles_connected| and |check_bundles_connected|.
When |allow_partial| is true, only when the number of channels of a
given DataType is the same for both bundles are the corresponding
channels connected together.
When |allow_partial| is false (the default), the number of channels must
match for each DataType (the ChanCounts must be equal) for the
connection to be attempted.
This also fixes the logic in case two bundles have the same number of
channels, or even the same ChanCounts, but not with the DataTypes in the
same order (so connecting the ith channel of the bundle to the ith
channel of the other bundle makes no sense).
|Bundle::nchannels()| creates a ChanCount on demand, by iterating over
the |_channel| member variable. The sum of all |nchannels().n(t)| over
all non-NIL DataTypes |t| is thus equal to |_channel.size()|.
Consequently, calling |nchannels().n_total()| is a convoluted (and slow)
way of getting |_channel.size()|. Add a method |Bundle::n_total()| that
directly returns the latter.