我有跨平臺的音頻處理應用程序。它是使用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);
}
我該如何解決這個問題?