【发布时间】:2012-02-14 15:06:22
【问题描述】:
我使用 AVAudioPlayer 播放 .caf 文件。我的问题是:它对我的目的来说不够响亮。由于 iPhone 的铃声响亮得多,我想知道如何存档此音量。 我已经尝试操作 .caf 文件,但没有真正成功。有什么想法吗?
我目前使用的代码:
AVAudioPlayer *newPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL: url error: nil];
self.appSoundPlayer = newPlayer;
[newPlayer release];
[appSoundPlayer prepareToPlay];
[appSoundPlayer setVolume: 0.8];
[appSoundPlayer setDelegate: self];
[appSoundPlayer play];
编辑:
[appSoundPlayer setVolume: 1.0];
谢谢 马丁
【问题讨论】:
标签: iphone ios avaudioplayer volume