gpt4 book ai didi

ios - AudioServicesPlaySystemSound 知道声音何时停止

转载 作者:行者123 更新时间:2023-12-01 17:58:04 32 4
gpt4 key购买 nike

我正在使用

AudioServicesPlaySystemSound(soundID);

播放声音,但我需要知道声音何时停止播放,那么这个委托(delegate)是什么?

谢谢!

最佳答案

你读过documentation吗? ?

AudioServicesPlaySystemSound

Plays a system sound object.

void AudioServicesPlaySystemSound (
SystemSoundID inSystemSoundID
);

Discussion This function plays a short sound (30 seconds or less in duration). Because sound might play for several seconds, this function is executed asynchronously. To know when a sound has finished playing, call the AudioServicesAddSystemSoundCompletion function to register a callback function.

This stackoverflow 问题可能会帮助您了解如何使用此回调。

关于ios - AudioServicesPlaySystemSound 知道声音何时停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14121612/

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