Simpleaudioengine: class avaudioplayer implemented twice log

i use v3.3beta0, xcode6.0.1, building for mac
im trying to learn audio using simpleaudioengine but i don’t get any sounds.
i preload the effect and play it but no sounds.
i notice a log on the console that says:

objc[40099]: Class AVAudioPlayer is implemented in both /System/Library/Frameworks/AVFoundation.framework/Versions/A/Resources/libAVFAudio.dylib and /Users/jingkyoda/Library/Developer/Xcode/DerivedData/MyCppGame-devujkmulrdctozfk/Build/Products/Debug/MyCppGame Mac.app/Contents/MacOS/MyCppGame Mac. One of the two will be used. Which one is undefined.

Is there something missing that i need to do or add first? Greatly appreciate all the help, thanks.

Hello,

I am having the same issue. Please share your solution if you get the answer.

Thanks.

I will if i find something but i currently proceed to shaders…
I can’t just wait esp. if no one has a soln. on this problem…
I wonder if we were just the 2 who has this problem…

anyone? just bump up to be notice…

bump…
no one has the same prob. here? exact the 2 of us(xpertdeveloper)?
this is weird…

Wow… just nothing
I guess LIBDGX is the way for me now.

cocos2d-x team,

Please rename your version of AVAudioPlayer to avoid conflicting with the version of AVAudioPlayer in the system framework : AVFoundation.framework. This is occurring when building, then running a Mac app.

# this next warning shows up when running the newly built Mac app:
Class AVAudioPlayer is implemented in both     /System/Library/Frameworks/AVFoundation.framework/Versions/A/Resources/libAVFAudio.dylib and /Users/gino/Library/Developer/Xcode/DerivedData/MyGame-eayiouiqfkfqznezyjugkzpownhk/Build/Products/Debug/MyGame-desktop.app/Contents/MacOS/MyGame-desktop. One of the two will be used. Which one is undefined.

# grep of AVAudioPlayer in the cocos2d-x source tree yields the following:
cocos/audio/mac/CDXMacOSXSupport.h
26: A set of proxy classes to allow iOS audio code to run on MacOS X. AVAudioPlayer is implemented using NSSound.
30: AVAudioPlayer numberOfLoops not correctly supported.  Looping is either on or off, can not specify a specific number of loops.
31: AVAudioPlayer panning not supported.
32: AVAudioPlayer metering not supported.
57: Based on AVAudioPlayer.h header in AVFoundation headers
60:@protocol AVAudioPlayerDelegate;
63:@interface AVAudioPlayer : NSObject <NSSoundDelegate> {

Still happening. I also don’t have sound on dekstop app… Any fix? How can I rename AVAudioPlayer?

Help please!

@piotrros

If you are building for Mac, try these steps to rebuild the app or simulator.

  1. Open the Mac project in Xcode
  2. Clean project and clean build folder on “Product” menu
  3. Rebuild the app

Nah, still the same error. It’s something wrong with static cocos library. I have older projects, which includes cocos2d directory and sound on mac desktop app is working without any problem. However now I use precompiled libs, which drastically reduce compilation time and project size.

Ok, I fixed that. I just needed to remove AVFoundation.framework from desktop target (in general settings).