2010-08-31 67 views
0

在新iPhone 4上進行測試時(嘗試使用兩種設備),我無法在應用程序中調整音量,但它在iPad上運行並且我的同事剛告訴我在使用iOS 4的3G上,嘗試增加時音量會下降......這根本就沒有意義。無法在iOS4上使用AudioToolbox/AudioServices.h調整音量

我正在使用AudioToolbox/AudioServices.h在Wav格式的遊戲中播放短音。它看起來像軟件版本影響了很多,但我不知道如何解決它...任何人? :)

感謝,

的Ondrej

回答

2

您好我有同樣的問題,我發現這是因爲我還沒有設置會話類:

NSError *setCategoryError = nil; 
[[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &setCategoryError]; 

if (setCategoryError) { //handle error } 

你可以找到更多關於會議在這裏:http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Cookbook/Cookbook.html#//apple_ref/doc/uid/TP40007875-CH6-SW6