On Feb 12, 2012, at 10:35 AM, Conrad Shultz wrote: > The simplest (and therefore least customizable) approach would be to use > NSSound. But I think it will do everything you stipulate.
A minor issue with NSSound in games is that, the first time you play a particular sound, it’ll first hang for a fraction of a second while it loads the file. I’ve found this to be annoyingly distracting since it also freezes animations. To work around this, at startup create the NSSound object, set its volume to 0 and play it once. That will pre-load the samples into memory. If you find yourself needing a more powerful API, AVFoundation might be a good bet now; I haven’t tried it myself. Beyond that you quickly end up falling down a rabbit-hole of ever more complex APIs, culminating in CoreAudio. —Jens
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com