我一直在尝试将 Port Audio 安装到我的 Mac 上,但遇到了麻烦。每次我尝试使用以下方法安装它时:
./configure --disable-mac-universal && make
它以错误代码 1 退出,因为 CoreAudio 已弃用功能。我听说在最近的一次更新中 CoreAudio 损坏了或以其他方式被弄乱了,也许这导致了我的问题?我现在不确定要尝试什么,因为我找不到在我的计算机上回滚 Core Audio 框架版本的方法。你们的任何建议都会很棒。
Mac OSX 10.7.5
Xcode 4.5.2
最新的 PortAudio 版本
实际错误代码:
AVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=8 -DHAVE_NANOSLEEP=1 -DPA_USE_COREAUDIO=1 src/hostapi/coreaudio/pa_mac_core.c -fno-common -DPIC -o src/hostapi/coreaudio/.libs/pa_mac_core.occ1: warnings being treated as errorssrc/hostapi/coreaudio/pa_mac_core.c: In function 'PaMacCore_GetChannelName':src/hostapi/coreaudio/pa_mac_core.c:140: warning: 'AudioDeviceGetPropertyInfo' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2611)src/hostapi/coreaudio/pa_mac_core.c:151: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2640)src/hostapi/coreaudio/pa_mac_core.c:159: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2640)src/hostapi/coreaudio/pa_mac_core.c:193: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2640)src/hostapi/coreaudio/pa_mac_core.c: In function 'PaMacCore_GetBufferSizeRange':src/hostapi/coreaudio/pa_mac_core.c:232: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2640)src/hostapi/coreaudio/pa_mac_core.c: In function 'gatherDeviceInfo':src/hostapi/coreaudio/pa_mac_core.c:361: warning: 'AudioHardwareGetPropertyInfo' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1249)src/hostapi/coreaudio/pa_mac_core.c:374: warning: 'AudioHardwareGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1270)src/hostapi/coreaudio/pa_mac_core.c:393: warning: 'AudioHardwareGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1270)src/hostapi/coreaudio/pa_mac_core.c:410: warning: 'AudioHardwareGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:1270)src/hostapi/coreaudio/pa_mac_core.c: In function 'ClipToDeviceBufferSize':src/hostapi/coreaudio/pa_mac_core.c:445: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2640)src/hostapi/coreaudio/pa_mac_core.c: In function 'CalculateFixedDeviceLatency':src/hostapi/coreaudio/pa_mac_core.c:525: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2640)src/hostapi/coreaudio/pa_mac_core.c:530: warning: 'AudioStreamGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:3023)src/hostapi/coreaudio/pa_mac_core.c:534: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2640)src/hostapi/coreaudio/pa_mac_core.c:538: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2640)src/hostapi/coreaudio/pa_mac_core.c: In function 'CalculateDefaultDeviceLatencies':src/hostapi/coreaudio/pa_mac_core.c:568: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2640)src/hostapi/coreaudio/pa_mac_core.c: In function 'GetChannelInfo':src/hostapi/coreaudio/pa_mac_core.c:597: warning: 'AudioDeviceGetPropertyInfo' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2611)src/hostapi/coreaudio/pa_mac_core.c:604: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2640)src/hostapi/coreaudio/pa_mac_core.c: In function 'InitializeDeviceInfo':src/hostapi/coreaudio/pa_mac_core.c:670: warning: 'AudioDeviceGetPropertyInfo' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2611)src/hostapi/coreaudio/pa_mac_core.c:677: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2640)src/hostapi/coreaudio/pa_mac_core.c:684: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2640)src/hostapi/coreaudio/pa_mac_core.c: In function 'UpdateSampleRateFromDeviceProperty':src/hostapi/coreaudio/pa_mac_core.c:1033: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2640)src/hostapi/coreaudio/pa_mac_core.c: In function 'QueryUInt32DeviceProperty':src/hostapi/coreaudio/pa_mac_core.c:1062: warning: 'AudioDeviceGetProperty' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2640)src/hostapi/coreaudio/pa_mac_core.c: In function 'SetupDevicePropertyListeners':src/hostapi/coreaudio/pa_mac_core.c:1120: warning: 'AudioDeviceAddPropertyListener' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2703)src/hostapi/coreaudio/pa_mac_core.c:1123: warning: 'AudioDeviceAddPropertyListener' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2703)src/hostapi/coreaudio/pa_mac_core.c:1125: warning: 'AudioDeviceAddPropertyListener' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2703)src/hostapi/coreaudio/pa_mac_core.c:1127: warning: 'AudioDeviceAddPropertyListener' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2703)src/hostapi/coreaudio/pa_mac_core.c: In function 'CleanupDevicePropertyListeners':src/hostapi/coreaudio/pa_mac_core.c:1135: warning: 'AudioDeviceRemovePropertyListener' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2729)src/hostapi/coreaudio/pa_mac_core.c:1138: warning: 'AudioDeviceRemovePropertyListener' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2729)src/hostapi/coreaudio/pa_mac_core.c:1140: warning: 'AudioDeviceRemovePropertyListener' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2729)src/hostapi/coreaudio/pa_mac_core.c:1142: warning: 'AudioDeviceRemovePropertyListener' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2729)src/hostapi/coreaudio/pa_mac_core.c: In function 'OpenAndSetupOneAudioUnit':src/hostapi/coreaudio/pa_mac_core.c:1304: warning: 'AudioDeviceAddPropertyListener' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2703)src/hostapi/coreaudio/pa_mac_core.c: In function 'AudioIOProc':src/hostapi/coreaudio/pa_mac_core.c:2340: warning: 'AudioConverterFillBuffer' is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AudioConverter.h:699)src/hostapi/coreaudio/pa_mac_core.c:2519: warning: 'AudioConverterFillBuffer' is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AudioConverter.h:699)src/hostapi/coreaudio/pa_mac_core.c: In function 'CloseStream':src/hostapi/coreaudio/pa_mac_core.c:2599: warning: 'AudioDeviceRemovePropertyListener' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2729)src/hostapi/coreaudio/pa_mac_core.c:2608: warning: 'AudioDeviceRemovePropertyListener' is deprecated (declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2729)make: *** [src/hostapi/coreaudio/pa_mac_core.lo] Error 1
最佳答案
如果更新到最新的 PortAudio SVN 不能解决问题,这是来自邮件列表的建议:
从构建脚本中删除 -Werror 并将其替换为 -Wall
或者尝试在 -Werror 之前添加 -Wno-deprecated
如果您确实尝试添加 -Wno-deprecated 请告诉我们您的进展情况,因为这是目前的首选选项,尽管它还没有经过太多测试。
我相信“构建脚本”是指 configure.in。
关于installation - 由于已弃用的核心音频功能,端口音频将无法安装,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13214534/