Skip to content

Commit

Permalink
register vst3 files without any audio effect inside as failed plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPudashkin committed Jul 4, 2023
1 parent a33d4ed commit 4d2816d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/framework/vst/internal/vstpluginmetareader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,9 @@ mu::RetVal<AudioResourceMetaList> VstPluginMetaReader::readMeta(const io::path_t
break;
}

if (result.empty()) {
return make_ret(Err::NoAudioEffect);
}

return RetVal<AudioResourceMetaList>::make_ok(result);
}
4 changes: 3 additions & 1 deletion src/framework/vst/vsterrors.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ enum class Err {
NoPluginFactory = 1402,
NoPluginProvider = 1403,
NoPluginController = 1404,
NoPluginWithId = 1405
NoPluginWithId = 1405,
NoAudioEffect = 1406,
};

inline Ret make_ret(Err e)
Expand All @@ -50,6 +51,7 @@ inline Ret make_ret(Err e)
case Err::NoPluginProvider: return Ret(retCode, "No VST3 audio module class found");
case Err::NoPluginController: return Ret(retCode, "No VST3 editor controller class found");
case Err::NoPluginWithId: return Ret(retCode, "VST3 plugin is not found");
case Err::NoAudioEffect: return Ret(retCode, "VST3 file contains no audio effect");
}

return Ret(retCode);
Expand Down

0 comments on commit 4d2816d

Please sign in to comment.