gpt4 book ai didi

objective-c - 复制、粘贴、删除操作的系统音效

转载 作者:行者123 更新时间:2023-12-03 16:29:12 25 4
gpt4 key购买 nike

有谁知道如何在 OS X 上播放(拖动)复制、粘贴和删除操作的系统音效?我的意思是 Finder 在移动文件时使用的声音。我没有找到任何 API 可以做到这一点。有人可能知道这些声音文件位于哪里吗?我只发现系统警报声( Frog 声、潜水艇声等......)。

最佳答案

SystemSounds 可在

中使用

/System/Library/Components/CoreAudio.component/Contents/Resources/SystemSounds/ 位置。

NSSound *systemSound = [[NSSound alloc] initWithContentsOfFile:@"/System/Library/Components/CoreAudio.component/Contents/Resources/SystemSounds/finder/move\ to\ trash.aif" byReference:YES];
if (systemSound) {
[systemSound play];
}

/System/Library/Components/CoreAudio.component/Contents/Resources/CoreAudioAUUI.bundle/Contents/Resources

关于objective-c - 复制、粘贴、删除操作的系统音效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10737809/

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