Use a single function with the complete logic.
Since the callgraph is complex, there is internal state as well as GUI
state (different pages), do not rely on individual methods to get it
right.
A widget's sensitivity should only be controlled by one function.
This can happen if both input and output devices are set to None for instance
on backends that report no supported SR or buffer size for the None device.
EngineControl::set_driver_popdown_strings is now like the other
set_*_popdown_strings methods in that it sets the driver strings and a
default active entry and returns false if no drivers are available.
The fix does not work properly anymore for the Portaudio backend and needs
fixing in another manner. It will now be temporarily back to the broken state
it was in before the "fix".
This stops a whole lot of redundant signal emission and makes it much easier to
think about what is going on. It also makes the dialog present much faster.
AudioBackend::enumerate_drivers is not supposed to be called for backends that
don't support driver selection. The wavesaudio backend asserts if the method is
called.
Connect to the backend_combo changed signal after setting state as calling
backend_combo.set_active_text() in set_state was triggering backend_changed(),
which would then see the driver_combo had not been set and set it to the
incorrect value.
The value/name of the backend needs to be restored first then we can populate
the driver combo and set the correct active entry from the saved state. After
which backend_changed() will populate the device combo's etc so they can then
be set to the correct active values from the saved state.
This is not a real fix; just a stop-gap for the worst offender.
iostream on OSX is not thread safe.
Sadly no crash report so far managed to catch the 2nd thread in action.
looks like the GUI thread is preempted, 2nd thread succeeds, and the
crash occurs later).
see also https://discussions.apple.com/thread/3479591
crash in
s << c->internal_to_user (c->get_value ());
ardour-4.1.335(5000,0x7fff777f5300) malloc: *** error for object 0x7fe2f3e06170: pointer being freed was not allocated
1 libsystem_c.dylib abort + 129
2 libsystem_malloc.dylib free + 428
3 libsystem_c.dylib __numeric_load_locale + 544
4 libsystem_c.dylib loadlocale + 216
5 libstdc++.6.dylib std::__convert_from_v(int* const&, char*, int, char const*, ...) + 193
6 libstdc++.6.dylib std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_float<double>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, char, double) const + 193
7 libstdc++.6.dylib std::ostream& std::ostream::_M_insert<double>(double) + 221
8 ardour-4.1.335 ProcessorEntry::Control::set_tooltip() + 854 (processor_box.cc:578)
9 ardour-4.1.335 ProcessorEntry::Control::control_changed() + 446 (processor_box.cc:637)
10 ibpbd.dylib PBD::StandardTimer::on_elapsed()
see 87b89a6
IMPORTANT NOTE: In theory, the correct glibmm function should have been Glib::filename_from_utf8() but I couldn't make that work on Windows and
ended up using Glib::locale_from_utf8() instead. sfdb import will therefore
need to get re-tested on the other platforms (especially in a non-English locale).
If this fix doesn't work we should probably revert to the previous strategy
but using the global specifier "::g_open()" explicitly…
… and only on PLATFORM_WINDOWS (POSIX #define g_open open) fails regardless.
This reverts commit 1a619472ca.
On Unix systems "#define g_open open" interferes with class member function
IMHO this is the wrong approach, the filename should be converted using
glib::filename_from_utf8().
For sfdb stuff, use glib file functions in preference to ANSI or libsndfile handling. On Windows, we need functions which understand UTF-8 (so that we'll be able to import sound files, even in a non-English locale).
when copying a plugin the state is transferred by serializing
XML and setting state from XML. This state includes the unique ID.
This ID needs to be identical at first in order to load
the state from <session-dir>/plugins/<ID>/*
Previously a Midi-track with synth showed “-“ for the output
even if the audio output ports were connected. (only MIDI
connections are displayed on the button).
Previously we were using a convoluted scheme of firstly setting the transport speed to 1.0, then later re-setting it to 0.0. On Windows this was having some strange side-effects (such as leaving the transport in Play mode and/or resetting the timeline to zero timecode). Hopefully this change will also work for the other platforms.
- display selected comtrol points in region gain lines
- display selected points in internal edit mode
- allow dragging of region gain lines in MouseContent mode
Pass 'true' to accept_on_focus_out of AudioClock, so that editing the
insert/remove time clock and then clicking elsewhere without hitting
<Enter> first doesn't mysteriously set the time back to 00:00:00.000.
If this parameter is passed as 'true', then edits to the clock will be
accepted when the user clicks away from the clock, rather than
unconditionally discarded as hitherto.
'Cut time' implies that the cut timeline items might end up on the
clipboard to be pasted somewhere: this isn't the case at present, so rename
the functions, class, &c. to say 'remove' rather than 'cut'.
Rename insert_time_dialog.{cc|h} to insert_remove_time_dialog while we're
at it.
Add options to move glued & locked markers to Editor::cut_time(), in line
with the insert_time() implementation.
Fix up the order in which operations apply to range marker start & end
points, to avoid problems when a range which lies after the cut point is
shorter than the length of the cut.
When inserting time and moving a range marker, move its end first, before
moving its start, so that if the time being inserted is greater than the
length of the range, we don't try to set its start to after its end.
Due to some change somewhere along the road the nudge clock does
no longer fit in the transport-bar on 1024px screen with 100% font-scale,
even if the 2nd clock is hidden.
However, these days it does fit nicely on its default position even
with wide-editor-mixer on a 1024px screen.
- also allow moving of automation lines in internal mouse mode.
- this is also a first pass at ensuring that if an operation does
nothing, avoid an undo entry.
- don't keep setting/unsetting write pass when transport frame
remains the same (think larger jack buffer sizes)
- insert guards are now 64 frames after when.
- refactor previous approach.
- clearing automation points sets control to "off" rather than touch.
- multiple touches on the same pass acts consistently (no more
fader jumps on mouse button press
- use actual value for initial point rather than some arbitrary
default. clarify new semantics of add () (with_default->with_initial).
- clean some whitespace
- add guard points as needed in stop.
- catch grab broken signal (i can't trigger it, but the docs seem
to think it is essential).
Call update_config() after selecting/deselecting all tracks/busses so that
the warning about 'No channels have been selected' is shown/hidden
appropriately.
Now that there are 'select all tracks/busses' buttons, it makes sense to me
that stem export should start off with no routes selected, rather than all.
Maybe stem export should by default select routes that are selected in the
editor, but that's a task for another time.
The exported file is silent, when choosing to export either region contents or
track outputs, so there seems no point in making such routes available for stem
export at all.
Perhaps there's an arguable use case for enabling stem export of inactive
tracks, but I can't see that it's worth worrying about for now.
switching to Grab should show the fade handles...
...switching away from grab should hide them.
Also, change "always show gain" preference to show lines, but not control points.
Some refactoring was necessary to avoid code duplication
Restoring of device state for input and output devices still doesn't work
correctly. I'm not quite sure what the issue is at this stage.