I am missing something fundamental when loading existing Edits.
When I create a new Edit, as in;
te::Edit::Options options{ engine,
te::createEmptyEdit(),
te::ProjectItemID::createNewID(0),
te::Edit::forEditing,
nullptr,
te::Edit::getDefaultNumUndoLevels(),
[editFile] { return editFile; } };
edit = std::make_unique<te::Edit>( options );
…everything works as expected.
Specifically, when I run
auto& deviceManager = engine.getDeviceManager();
const auto numWaveInDevices{ deviceManager.getNumWaveInDevices() };
then, numWaveInDevices equals 2, which is correct. And, edit->getAllInputDevices() equals 2, also correct.
However, if I am opening an existing edit. The numWaveInDevices equls 2. But, edit->getAllInputDevices() equals 0. And, of course, I am unable to set recording enabled, etc.
It must be something I am missing in the edit constructor.
I am using
te::Edit::Options options{ engine,
te::loadEditFromFile(editFile, te::ProjectItemID::createNewID(0)),
{},
te::Edit::forEditing,
nullptr,
te::Edit::getDefaultNumUndoLevels(),
[editFile] { return editFile; } };
edit = std::make_unique<te::Edit>( options );
I am sure that the second and third parameters for “options” are the culprit. What should they, in fact, be in order to load an existing edit?
Any help is most appreciated.