NSSound -(id)声音名称:(NSString *)名称;
是否 [NSSound soundNamed:@"RandomName"];缓存听起来像 [NSImage imagenNamed:@"randomName"];做?类参考中没有提到它
Does [NSSound soundNamed:@"RandomName"]; cache sounds like [NSImage imagenNamed:@"randomName"]; does? It doesn't mention it in the class reference
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
“soundNamed: 方法检查应用程序的声音缓存中是否存在具有指定名称的现有声音资源。如果指定的资源当前不在声音缓存中,NSSound 会自动在其他几个位置搜索它,包括应用程序的主包和任何系统库/声音目录。”
来自苹果文档
"The soundNamed: method checks the application’s sound cache for an existing sound resource with the specified name. If the specified resource is not currently in the sound cache, NSSound automatically searches for it in several other locations, including your application’s main bundle and any system Library/Sounds directories."
From the apple docs