I'm trying to play a sound effect with
[[SimpleAudioEngine sharedEngine] playBackgroundMusic:@"libertybell.mp3"];
However, followinf the FAQ, I've imprted the following headers
#import "SimpleAudioEngine.h"
#import "CocosDenshion.h"
#import "CDAudioManager.h"
#import "CDOpenALSupport.h"
But the last one in that "CDOpenALSupport.h" causes the following linking error..
cd "/Users/him/Development/Games/Stock Control"
setenv MACOSX_DEPLOYMENT_TARGET 10.5
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.sdk "-L/Users/him/Development/Games/Stock Control/build/Debug-iphonesimulator" "-F/Users/him/Development/Games/Stock Control/build/Debug-iphonesimulator" -filelist "/Users/him/Development/Games/Stock Control/build/Stock Control.build/Debug-iphonesimulator/Stock Control.build/Objects-normal/i386/Stock Control.LinkFileList" -mmacosx-version-min=10.5 -all_load -ObjC -framework CoreGraphics -framework Foundation -framework OpenGLES -framework QuartzCore -framework UIKit -framework AudioToolbox -framework OpenAL -lz -framework AVFoundation "-lcocos2d libraries" -o "/Users/him/Development/Games/Stock Control/build/Debug-iphonesimulator/Stock Control.app/Stock Control"
ld: duplicate symbol _loadWaveAudioData in /Users/him/Development/Games/Stock Control/build/Stock Control.build/Debug-iphonesimulator/Stock Control.build/Objects-normal/i386/AudioController.o and /Users/him/Development/Games/Stock Control/build/Stock Control.build/Debug-iphonesimulator/Stock Control.build/Objects-normal/i386/Stock_ControlAppDelegate.o
collect2: ld returned 1 exit status
If I remove the header in questions, I get the following error...
[Session started at 2009-11-19 17:41:15 +0000.]
2009-11-19 17:41:18.064 Stock Control[23347:20b] cocos2d: cocos2d v0.8.2
2009-11-19 17:41:18.070 Stock Control[23347:20b] cocos2d: Using Director Type:TimerDirector
2009-11-19 17:41:18.161 Stock Control[23347:20b] Denshion: Checking for other audio
2009-11-19 17:41:18.163 Stock Control[23347:20b] Denshion: Other audio is not playing audio will be exclusive
2009-11-19 17:41:18.165 Stock Control[23347:20b] Denshion: channel def 0 0 30 0
2009-11-19 17:41:21.974 Stock Control[23347:20b] Denshion: loading new or different background music file libertybell.mp3
2009-11-19 17:41:21.997 Stock Control[23347:20b] Error loading /Library/QuickTime/LiveType.component/Contents/MacOS/LiveType: dlopen(/Library/QuickTime/LiveType.component/Contents/MacOS/LiveType, 262): Symbol not found: _SCDynamicStoreCopyConsoleUser
Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
Which from what I can tell, is the same error I get when I try to run the CocoshDendhion examples...
[Session started at 2009-11-19 17:57:21 +0000.]
2009-11-19 17:57:24.490 CocosDenshionDemo[24706:20b] cocos2d: cocos2d v0.8.2
2009-11-19 17:57:24.494 CocosDenshionDemo[24706:20b] cocos2d: Using Director Type:TimerDirector
2009-11-19 17:57:24.559 CocosDenshionDemo[24706:420b] Denshion: Checking for other audio
2009-11-19 17:57:24.560 CocosDenshionDemo[24706:420b] Denshion: Other audio is not playing audio will be exclusive
2009-11-19 17:57:24.563 CocosDenshionDemo[24706:420b] Denshion: channel def 0 0 0 0
2009-11-19 17:57:24.563 CocosDenshionDemo[24706:420b] Denshion: channel def 1 1 1 1
2009-11-19 17:57:24.564 CocosDenshionDemo[24706:420b] Denshion: channel def 2 2 9 2
2009-11-19 17:57:24.564 CocosDenshionDemo[24706:420b] Denshion: channel def 3 10 25 10
2009-11-19 17:57:24.566 CocosDenshionDemo[24706:420b] Denshion: channel def 4 26 27 26
2009-11-19 17:57:28.567 CocosDenshionDemo[24706:420b] Denshion: CDAsynchBufferLoader loading buffers
2009-11-19 17:57:28.576 CocosDenshionDemo[24706:420b] Denshion: Loading openAL buffer 1 808_120bpm.caf
2009-11-19 17:57:28.651 CocosDenshionDemo[24706:420b] Error loading /Library/QuickTime/LiveType.component/Contents/MacOS/LiveType: dlopen(/Library/QuickTime/LiveType.component/Contents/MacOS/LiveType, 262): Symbol not found: _SCDynamicStoreCopyConsoleUser
Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
umm..... I'm completely lost on this one. Any ideas?