【问题标题】:iPhone SDK: How to normalize audio playback using AVAudioPlayer?iPhone SDK:如何使用 AVAudioPlayer 标准化音频播放?
【发布时间】:2010-12-30 21:18:51
【问题描述】:

我正在使用 AVAudioPlayer 进行一些测试,并注意到音频非常低。一些应用程序,比如 Audio Memos Free,有一个“自动标准化”播放音量的选项,这会导致比我将 AVAudioPlayer 音量设置为 100% 时的播放音量要大得多。像这样的应用程序如何使播放音量正常化?我看不到对 AVFoundation 类中的任何控制。

【问题讨论】:

  • 你有没有找到一种方法来规范化音频?

标签: ios4 core-audio avaudioplayer avfoundation


【解决方案1】:

在 AVAudioSession 类中有各种类别来处理播放http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVAudioSession_ClassReference/Reference/Reference.html。在这种情况下,如果您使用 AVAudioSessionCategoryPlayback,与 AVAudioSessionCategoryPlayAndRecord 等其他类别相比,您将获得更高的播放声音。还有一个 setVolume: AVAudioPlayer 的属性。 如果您需要对音频进行更多控制,可以使用 Core Audio 框架。请参阅http://developer.apple.com/library/mac/#documentation/MusicAudio/Reference/CACoreAudioReference/CoreAudioTypes/CompositePage.html 和示例 Speak Here 应用程序http://developer.apple.com/library/ios/#samplecode/SpeakHere/Introduction/Intro.html 了解更多详情。希望对您有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多