Is there a way to open an InputFileStream as shared?
If a user shift+drags (?) our plugin from one insert slot in ProTools to another, then it copies the plug-in to that second insert slot. But our plugin uses an external file for some audio data that it records, and that second instance needs to access that file.
From what i see in the FileInputStream class, though, there does not appear to be a way to set the flag that this file can be shared with other readers. Here is the code in question:
auto f = open (file.getFullPathName().toUTF8(), O_RDONLY);
if (f != -1) fileHandle = fdToVoidPointer (f); else status = getResultForErrno();
(This is on the Mac, by the way.)
I think that in order to share the file, the flag needs to be O_RDONLY| O_NONBLOCK, but this code does not allow adding that flag. Is there some way currently to allow this? Do I need to write my own InputFileStream class to allow that?