【问题标题】:iOS SystemSoundID does not work on iPod 4, but works on iPhone 4iOS SystemSoundID 不适用于 iPod 4,但适用于 iPhone 4
【发布时间】:2012-11-03 15:41:54
【问题描述】:

为什么 SystemSoundID 在 iPhone 上工作而不在 iPod 上工作?

我已经搜索了 Apple 文档。并用谷歌搜索但一无所获。 我的应用程序在 iPhone gen 4 (iOS 5.1) 上使用 SystemSoundID 播放 .m4a 声音文件,但不能在 iPod gen 4 (iOS 5.1) 或 iPod gen 2 (iOS 4.2) 上播放。声音不播放,完成回调失败。

AVAudioPlayer 在所有设备上都可以正常工作,我用它来连续播放背景音乐,但我需要 SystemSoundID AudioServicesAddSystemSoundCompletion 才能连续排列声音。

我会使用 AVAudioPlayer 播放背靠背的声音文件,但我找不到它的完成回调函数。

【问题讨论】:

    标签: iphone ios ipod-touch


    【解决方案1】:

    设置->声音->铃声和警报打开它,并设置为最大音量。我只是忘记打开它,所以 SoundID 无法播放。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-11
      相关资源
      最近更新 更多