13
0

Fix MIDI source write-names

This follows bb50925998,
Prevent leaking "recorder:" into the file-name, and fixes
a related bug setting the "captured for" ID for MIDI
This commit is contained in:
Robin Gareus 2021-04-11 15:08:57 +02:00
parent 8661aa1809
commit 635d83709b
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1227,7 +1227,7 @@ DiskWriter::transport_stopped_wallclock (struct tm& when, time_t twhen, bool abo
midi_srcs.push_back (_midi_write_source);
_midi_write_source->set_natural_position (capture_info.front()->start);
_midi_write_source->set_captured_for (_name);
_midi_write_source->set_captured_for (_track.name ());
Glib::DateTime tm (Glib::DateTime::create_now_local (mktime (&when)));
_midi_write_source->set_take_id (tm.format ("%F %H.%M.%S"));
@ -1347,7 +1347,7 @@ DiskWriter::steal_write_source_name ()
*/
try {
string new_path = _session.new_midi_source_path (name());
string new_path = _session.new_midi_source_path (write_source_name ());
if (_midi_write_source->rename (new_path)) {
return string();