gpt4 book ai didi

iphone - 使用 AudioServices 在 iPhone 上停止播放声音样本

转载 作者:行者123 更新时间:2023-12-03 00:11:45 26 4
gpt4 key购买 nike

我正在实现在用户拖动 UISlider 时播放的声音效果。

这是 IBAction:由 UISlider 的 调用值已更改 事件

-(IBAction)playTone4; {
AudioServicesPlaySystemSound(soundID4);
}

当用户是 时,我希望声音停止不是 拖动 slider 但有 未发布它。

有没有办法做到这一点?似乎没有 AudioServices 停止 SystemSound() 函数。

最佳答案

系统声音无法停止 .

iPhone Programming Guide: section Multimeda Support了解更多信息。

为了达到预期的效果,我建议使用 AV音频播放器音频队列 .我提到的编程指南涵盖了您想了解的有关这些技术的所有内容。

关于iphone - 使用 AudioServices 在 iPhone 上停止播放声音样本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/929785/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com