Skip to content

Commit

Permalink
加载插件时忽略重复引擎,内嵌引擎优先
Browse files Browse the repository at this point in the history
  • Loading branch information
LiuYunPlayer committed May 12, 2024
1 parent 5e2f437 commit a8633bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions TuneLab/Extensions/Voices/VoicesManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ static void LoadFromTypes(Type[] types, string path)
{
if (typeof(IVoiceEngine).IsAssignableFrom(type))
{
if (mVoiceEngines.ContainsKey(attribute.Type))
continue;

var constructor = type.GetConstructor(Type.EmptyTypes);
if (constructor != null)
mVoiceEngines.Add(attribute.Type, new VoiceEngineStatus((IVoiceEngine)constructor.Invoke(null), path));
Expand Down

0 comments on commit a8633bb

Please sign in to comment.