4

我一直在尝试将 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.o cc1: warnings being treated as errors src/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

4

2 回答 2

2

如果更新到最新的 PortAudio SVN 不能解决问题,这是邮件列表中的建议:

从构建脚本中删除 -Werror 并将其替换为 -Wall

或者尝试在 -Werror 之前添加 -Wno-deprecated

如果您确实尝试添加 -Wno-deprecated,请告诉我们您的情况,因为这是目前的首选选项,尽管它尚未经过太多测试。

我相信,“构建脚本”是指 configure.in。

于 2012-11-04T15:20:49.150 回答
1

这对我有用(-w 禁用 GCC 中的所有警告)

CFLAGS=-w ./configure && make

我尝试了-Wno-depreacted,但它对我不起作用:

command line option "-Wno-deprecated" is valid for C++/Java/ObjC++ but not for C
于 2013-05-03T17:07:19.490 回答