我有跨平台的音频处理应用程序。它是使用Qt和PortAudio库编写的。我还使用Chaotic-Daw音源处理某些音频处理功能(Vibarto效果和Soft-Knee动态范围压缩)。问题是,我不能口我的应用程序从Windows到Mac OSX,因为我得到的编译器错误的__asm
部分(我使用的是Mac OSX的优胜美地和Qt Creator IDE 3.4.1):移植到Mac OS X错误
/Users/admin/My projects/MySound/daw/basics/rosic_NumberManipulations.h:69:
error: expected '(' after 'asm' { ^
这样的线路:
INLINE int floorInt(double x)
{
const float round_towards_m_i = -0.5f;
int i;
#ifndef LINUX
__asm
{ // <========= error indicates that row
fld x;
fadd st, st (0);
fadd round_towards_m_i;
fistp i;
sar i, 1;
}
#else
i = (int) floor(x);
#endif
return (i);
}
我该如何解决这个问题?