不起作用:
var b:ByteArray = new ByteArray();
b.writeFloat(-50.000000);
b.position = 0;
cpp.processFloat(b,b.bytesAvailable);
共产党:
static AS3_Val processFloat(void* self, AS3_Val args){
unsigned iTestSize;
AS3_Val sOrigFile = AS3_Undefined();
AS3_ArrayValue( args, "AS3ValType, IntType", &sOrigFile, &iTestSize );
float * sFile = (float *)malloc(sizeof(float) * (iTestSize + 1));
int res = AS3_ByteArray_readBytes(sFile, sOrigFile, iTestSize);
fprintf( stderr, "** processFloat() size: %i sFile: %.03f, res:%i\n", iTestSize, sFile, res );
fprintf 输出:** processFloat 大小:4 sFile:0.000,res:4
怎么了?如何将浮点数组从闪存传递给 swc?