【发布时间】:2016-02-29 08:37:15
【问题描述】:
我有跨平台的音频处理应用程序。它是使用 Qt 和 PortAudio 库编写的。我还将Chaotic-Daw 源用于一些音频处理功能(Vibarto 效果和软拐点动态范围压缩)。问题是我无法将我的应用程序从 Windows 移植到 Mac OSX,因为我收到了 __asm 部分的编译器错误(我使用 Mac OSX Yosemite 和 Qt Creator 3.4.1 IDE):
/用户/管理员/我的 项目/MySound/daw/basics/rosic_NumberManipulations.h:69:
错误: 预期在 '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);
}
我该如何解决这个问题?
【问题讨论】:
标签: c++ macos clang cross-platform