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,89 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace SpeechLib {
[ComImport]
[Guid("7A1EF0D5-1581-4741-88E4-209A49F11A10")]
[TypeLibType(4160)]
public interface ISpeechWaveFormatEx {
[DispId(1)]
short FormatTag {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[param: In]
set;
}
[DispId(2)]
short Channels {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[param: In]
set;
}
[DispId(3)]
int SamplesPerSec {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
[param: In]
set;
}
[DispId(4)]
int AvgBytesPerSec {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[param: In]
set;
}
[DispId(5)]
short BlockAlign {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(5)]
[param: In]
set;
}
[DispId(6)]
short BitsPerSample {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(6)]
[param: In]
set;
}
[DispId(7)]
object ExtraData {
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
[return: MarshalAs(UnmanagedType.Struct)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(7)]
[param: In]
[param: MarshalAs(UnmanagedType.Struct)]
set;
}
}
}