• 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: NSSound queston (easy one)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSound queston (easy one)


  • Subject: Re: NSSound queston (easy one)
  • From: David Reed <email@hidden>
  • Date: Fri, 4 Jun 2004 22:59:45 -0400

Kyle,

Your code snippet looks fine. Have you considered these questions:
1) Is "coins" in a sound format NSSound can read?
2) If it is an AIFF file, is the extension ".aiff" rather than ".aif"?
3) Can the sound file be played in QuickTime Player or iTunes (i.e, is it valid)?

These are some reasons given by the NSSound documentation as to why a nil would be returned.

David.

On Friday, Jun 4, 2004, at 22:42 US/Eastern, Kodex wrote:

hey can anyone fill me in while this returns a NIL?
Its in the mainbundle and all. Thanks
Kyle


NSSound *coins = [NSSound soundNamed:@"coins"];
[coins play];
NSLog(@"%@", coins);
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >NSSound queston (easy one) (From: Kodex <email@hidden>)

  • Prev by Date: NSSound queston (easy one)
  • Next by Date: Re: NSSound queston (easy one)
  • Previous by thread: NSSound queston (easy one)
  • Next by thread: Re: NSSound queston (easy one)
  • Index(es):
    • Date
    • Thread