short v = 0;
for (unsigned int sample = 0; sample < length; sample++)
{
v = (short)(inbuffer[sample * 2] * 32767.0f);
fwrite(&v, 2, 1, file);
}
Mac (objective-c, iphone ?) . fwrite, , , , , , . :
short v[SZ] = 0;
for (unsigned int sample = 0; sample < length; sample++)
{
v[sample] = (short)(inbuffer[sample * 2] * 32767.0f);
}
fwrite(v,sizeof(v),1,file);