fix: Fix TTS COM exception in IL2CPP
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SpeechLib {
|
||||
[ComImport]
|
||||
[TypeLibType(4160)]
|
||||
[Guid("6450336F-7D49-4CED-8097-49D6DEE37294")]
|
||||
public interface ISpeechBaseStream {
|
||||
[DispId(1)]
|
||||
SpAudioFormat Format {
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1)]
|
||||
[param: In]
|
||||
[param: MarshalAs(UnmanagedType.Interface)]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(2)]
|
||||
int Read([MarshalAs(UnmanagedType.Struct)] out object Buffer, [In] int NumberOfBytes);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(3)]
|
||||
int Write([In][MarshalAs(UnmanagedType.Struct)] object Buffer);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(4)]
|
||||
[return: MarshalAs(UnmanagedType.Struct)]
|
||||
object Seek([In][MarshalAs(UnmanagedType.Struct)] object Position, [In] SpeechStreamSeekPositionType Origin = SpeechStreamSeekPositionType.SSSPTRelativeToStart);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user