问题1:c++中的unsigned short * pSndData,使用C#表示是否应该是System.UIntPtr pSndData?
问题2:我打算读取UIntPrt指向的地址的数据,然后写入文件,这个应该怎么实现?
c++中使用了std::ofstream fout(cSndName,ios::binary);
fout.write((char *)pSndData,nSndSize);
写入,C#中呢?
请大家帮帮忙吧,查了1天资料了,毫无进展^_^
问题2:我打算读取UIntPrt指向的地址的数据,然后写入文件,这个应该怎么实现?
c++中使用了std::ofstream fout(cSndName,ios::binary);
fout.write((char *)pSndData,nSndSize);
写入,C#中呢?
请大家帮帮忙吧,查了1天资料了,毫无进展^_^
两个可能:
1. System.UInt16 pSndData
2. System.UInt16[] pSndData写文件,可能参考 System.IO 命名空间。
FnxTtsSynthText( FNX_TTS_SB_PTR lpSoundbank, unsigned short **output, unsigned int *nInOutBytes, const char *szInput, const int iFlags )
C#托管后如下
FnxTtsSynthText(System.IntPtr lpSoundBank,ref System.UIntPtr output, ref System.Int32 outsize, System.String input, System.Int16 iflags)
请问这样有错误么?第2和第3个参数是我问题的关键呢^_^
BinaryWriter写入的话,只是一个整数,并不是Wave。