fix: Fix TTS COM exception in IL2CPP

This commit is contained in:
2025-05-07 22:56:32 +08:00
parent 5daee1a01a
commit a3efe939e8
107 changed files with 3862 additions and 79 deletions

View File

@@ -0,0 +1,96 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[Guid("8BE47B07-57F6-11D2-9EEE-00C04F797396")]
[TypeLibType(4160)]
public interface ISpeechVoiceStatus {
[DispId(1)]
int CurrentStreamNumber {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
get;
}
[DispId(2)]
int LastStreamNumberQueued {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
get;
}
[DispId(3)]
int LastHResult {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
get;
}
[DispId(4)]
SpeechRunState RunningState {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
get;
}
[DispId(5)]
int InputWordPosition {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
get;
}
[DispId(6)]
int InputWordLength {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
get;
}
[DispId(7)]
int InputSentencePosition {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
get;
}
[DispId(8)]
int InputSentenceLength {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(8)]
get;
}
[DispId(9)]
string LastBookmark {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(9)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
}
[DispId(10)]
int LastBookmarkId {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[TypeLibFunc(64)]
[DispId(10)]
get;
}
[DispId(11)]
short PhonemeId {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(11)]
get;
}
[DispId(12)]
short VisemeId {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(12)]
get;
}
}
}