• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa Sounds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa Sounds


  • Subject: Re: Cocoa Sounds
  • From: James Walker <email@hidden>
  • Date: Tue, 10 Nov 2009 10:26:14 -0800

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 (email@hidden)

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:
This email sent to email@hidden


References: 
 >Re: Cocoa Sounds (From: Matt Neuburg <email@hidden>)
 >Re: Cocoa Sounds (From: Damien Cooke <email@hidden>)

  • Prev by Date: Re: iPhone: how to tell if a UIScrollView is scrolling?
  • Next by Date: Re: iPhone: how to tell if a UIScrollView is scrolling?
  • Previous by thread: Re: Cocoa Sounds
  • Next by thread: Adding new rules to policy database
  • Index(es):
    • Date
    • Thread