Damien Cooke wrote:
Hi all,
I may be way off but in my iPhone game I used SystemSoundID and AudioServicesCreateSystemSoundID I am not sure if that is helpful at all but it did not seem to have a delay but it does not support many formats either. So if you are happy to convert your format this may be an option?

it looks like this

SystemSoundID wrongLetter;
AudioServicesCreateSystemSoundID((CFURLRef) [[NSURL alloc] initFileURLWithPath:[[NSBundle mainBundle] pathForResource:@"wrongLetter" ofType:@"aiff"]], &wrongLetter);

AudioServicesPlaySystemSound(wrongLetter);

//when finished
AudioServicesDisposeSystemSoundID(wrongLetter);


On the Mac, this way of playing a sound will respect the "play user interface sound effects" checkbox in the Sound preference panel, unless you make an AudioServicesSetProperty call to change that. I think.
--
  James W. Walker, Innoventive Software LLC
  <http://www.frameforge3d.com/>
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to