开发者

AVAudioPlayer Output to Speaker

After searching around for how to send AVAudioPlayer output to the iPhone's speaker, I found this:

iPhone audio 开发者_开发知识库playback: force through internal speaker?

Despite setting the category correctly to AVAudioSessionCategoryPlayAndRecord, this solution doesn't seem to be working for me and won't even let the build compile, giving me this error:

"_AudioSessionSetProperty", referenced from:

...
...

ld: symbol(s) not found
collect2: ld returned 1 exit status

Am I not including something? I'm importing AudioToolbox, AVFoundation, and CoreAudio.

My class implements AVAudioSessionDelegate, AVAudioRecorderDelegate, AVAudioPlayerDelegate, and UITextFieldDelegate.

Any help would be greatly appreciated!


Add the AudioToolbox and AVFoundation frameworks to your project by Right-Cliking on Frameworks -> Add -> Existing Frameworks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜