gpt4 book ai didi

cocoa - 以 'snd ' 资源格式播放声音数据的现代方式是什么?

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

声音管理器函数(例如 SndPlay())已弃用,并且在 64 位中不可用。 AudioServices 功能很现代,但似乎只处理文件而不是documented处理这种格式。

最佳答案

我不确定是否有现代 API 可以播放它们,也许是因为这种格式非常古老且复杂,从 System 7 开始,此后经过多次扩展。

我发现有关“snd”资源的内容:

System sound files are simply type 1 'snd ' resources stored with a type of 'sfil' and a creator of 'movr'. The Mac OS provides the familiar icon for them and permits playback in the Finder by double-clicking on them. An 'snd ' is a type of resource which consists of a series of commands for use by the Sound Manager. In addition to digitized sound samples, 'snd ' resources can contain direct frequency-modulated and wave table-based sounds. Any number of the three types can be combined with various effects to produce complex sound files. Simple Beep is an example of a non-digitized 'snd '. There are two types of 'snd ' resources, amazingly called type 1 and type 2. Type 1 is the format described above and is referred to as the System sound format. Type 2 is for use with HyperCard and can contain only a sampled (digitized) sound. SoundApp can play both types but will only convert sampled sounds. For more information on 'snd ' files consult Inside Macintosh VI or Inside Macintosh: Sound. A familiarity with the Resource Manager would also be helpful. 8-bit samples are stored as unsigned bytes, like SoundCap/Edit, but 16-bit samples are signed, like AIFF. Stereo 'snd ' resources are also possible, but Sound Manager 3.0 or later is required to play 16-bit samples directly. The possible types of compression for 'snd ' resources are the same MACE, IMA and µ-law types used in AIFF-C files.

来源:http://www-cs-students.stanford.edu/~franke/SoundApp/formats.html#system7

我认为您最好的选择是将任何此类声音重新录制为中间无损格式以供存档,然后将它们转换为适合您的应用程序要求的最佳格式。

关于cocoa - 以 'snd ' 资源格式播放声音数据的现代方式是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2381651/

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