From 853b2a7f52b443cb219d817d0eea0a2bbdb96155 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 21 Jul 2021 02:22:25 +0200 Subject: [PATCH] Make CoreaudioSource work again existence_check() calls prevent_deletion() -> mark_immutable() which since a4d7b45fe00 calls close(). So the file needs to be open()ed after the existence check. --- libs/ardour/coreaudiosource.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libs/ardour/coreaudiosource.cc b/libs/ardour/coreaudiosource.cc index 66cf61e1a4..d0543b4c96 100644 --- a/libs/ardour/coreaudiosource.cc +++ b/libs/ardour/coreaudiosource.cc @@ -51,10 +51,9 @@ CoreAudioSource::CoreAudioSource (Session& s, const XMLNode& node) : Source (s, node) , AudioFileSource (s, node) { - init_cafile (); - - assert (Glib::file_test (_path, Glib::FILE_TEST_EXISTS)); + assert (Glib::file_test (_path, Glib::FILE_TEST_EXISTS)); existence_check (); + init_cafile (); } /** Create a new CoreAudioSource from an existing file. Sources created with this @@ -65,11 +64,11 @@ CoreAudioSource::CoreAudioSource (Session& s, const string& path, int chn, Flag AudioFileSource (s, path, Source::Flag (flags & ~(Writable|Removable|RemovableIfEmpty|RemoveAtDestroy))) { + assert (Glib::file_test (_path, Glib::FILE_TEST_EXISTS)); + existence_check (); + _channel = chn; init_cafile (); - - assert (Glib::file_test (_path, Glib::FILE_TEST_EXISTS)); - existence_check (); } void