fix: Fix TTS COM exception in IL2CPP
This commit is contained in:
53
Assets/Plugins/Windows/Interop.SpeechLib/SpAudioFormat.cs
Normal file
53
Assets/Plugins/Windows/Interop.SpeechLib/SpAudioFormat.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SpeechLib {
|
||||
[ComImport]
|
||||
[CoClass(typeof(SpAudioFormatClass))]
|
||||
[Guid("E6E9C590-3E18-40E3-8299-061F98BDE7C7")]
|
||||
public interface SpAudioFormat : ISpeechAudioFormat { }
|
||||
|
||||
[ComImport]
|
||||
[Guid("9EF96870-E160-4792-820D-48CF0649E4EC")]
|
||||
[ClassInterface((ClassInterfaceType)0)]
|
||||
[TypeLibType(2)]
|
||||
public class SpAudioFormatClass : ISpeechAudioFormat, SpAudioFormat {
|
||||
[DispId(1)]
|
||||
public virtual extern SpeechAudioFormatType Type {
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(2)]
|
||||
public virtual extern string Guid {
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(2)]
|
||||
[TypeLibFunc(64)]
|
||||
[return: MarshalAs(UnmanagedType.BStr)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
[DispId(2)]
|
||||
[param: In]
|
||||
[param: MarshalAs(UnmanagedType.BStr)]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(3)]
|
||||
[TypeLibFunc(64)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern SpWaveFormatEx GetWaveFormatEx();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(4)]
|
||||
[TypeLibFunc(64)]
|
||||
public virtual extern void SetWaveFormatEx([In][MarshalAs(UnmanagedType.Interface)] SpWaveFormatEx SpeechWaveFormatEx);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user