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,47 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[TypeLibType(4160)]
[Guid("E6E9C590-3E18-40E3-8299-061F98BDE7C7")]
public interface ISpeechAudioFormat {
[DispId(1)]
SpeechAudioFormatType Type {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[param: In]
set;
}
[DispId(2)]
string Guid {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[TypeLibFunc(64)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[TypeLibFunc(64)]
[param: In]
[param: MarshalAs(UnmanagedType.BStr)]
set;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[TypeLibFunc(64)]
[return: MarshalAs(UnmanagedType.Interface)]
SpWaveFormatEx GetWaveFormatEx();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[TypeLibFunc(64)]
void SetWaveFormatEx([In][MarshalAs(UnmanagedType.Interface)] SpWaveFormatEx SpeechWaveFormatEx);
}
}