13
0

Make CoreaudioSource work again

existence_check() calls prevent_deletion() -> mark_immutable()
which since a4d7b45fe0 calls close().

So the file needs to be open()ed after the existence check.
This commit is contained in:
Robin Gareus 2021-07-21 02:22:25 +02:00
parent 9ae2e1044a
commit 853b2a7f52
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -51,10 +51,9 @@ CoreAudioSource::CoreAudioSource (Session& s, const XMLNode& node)
: Source (s, node) : Source (s, node)
, AudioFileSource (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 (); existence_check ();
init_cafile ();
} }
/** Create a new CoreAudioSource from an existing file. Sources created with this /** 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, AudioFileSource (s, path,
Source::Flag (flags & ~(Writable|Removable|RemovableIfEmpty|RemoveAtDestroy))) Source::Flag (flags & ~(Writable|Removable|RemovableIfEmpty|RemoveAtDestroy)))
{ {
assert (Glib::file_test (_path, Glib::FILE_TEST_EXISTS));
existence_check ();
_channel = chn; _channel = chn;
init_cafile (); init_cafile ();
assert (Glib::file_test (_path, Glib::FILE_TEST_EXISTS));
existence_check ();
} }
void void