This fixes an issue when switching formats.
ExportFormatDialog::update_selection iterates e.g. WAV BWV.
If BWV was selected and a user selects WAV the following happpens
1. WAV is selected
2. BWV is deselected
3. Since BWF and WAV are the same format, ExportFormatManager
deselects WAV
This fixes a bug introduced in d06a0d9c9d. The MIDI data
has to be written first, otherwise the CC-event do not exit
and MidiModel::source_interpolation_changed() crashes.
StartupFSM does not catch SessionException from Session::load_state,
but bails out early, after checking `get_info_from_path` instead.
So we have to explicitly report errors.
We now generate a grid from the TempoMap of appropriate "density". Doing this
in the editor just gets things wrong (and partially duplicates the (complex)
logic already present in the TempoMap).
There were many logical errors in the previous implementation. This one is
simpler to read, and appears to work much better.
It also allows the caller to specify the quarter-note subdivision to use when
generating the grid, rather than choosing only between some bar modulo or
quarter notes.
It can happen that the main AlsaAudioBackend::_device_reservation
is still busy while I/O devices are set. In this case a
dedicated AlsaDeviceReservation needs to be used which can fail
silently.
A common example is disconnecting a USB device while it is in
use. The Halted signal can show the session dialog, which calls
set_input_device_name before the device reservation of the
unplugged device terminated.
ALSA backend modified the internal state when different devices
were used, re-assigning one (usually input-device) to "None"
when it's resampled. This lead to EngineHints not matching the
EngineState, and autostart was disabled, and a dialog
"Engine I/O device has changed since you last opened this session."
Archiving creates a dedicated mono file for each Source.
When the original session has (embedded) stereo files, the
channel needs to be temporarily set to 0.
Playlist::add_region copies regions as needed (see 8d045e15dc),
without forking the Source.
This fixes an issue when importing MIDI files. When
midi-copy-is-fork is enabled (enabled by default), the
RegionFactory::create call used during import forked the
region. This resulted in two Sources being created for each
imported MIDI file.