Re: problems loading a sound with NSSound

2010-03-08 Thread Jonathan Chacón
Hello, this works great! NSSound *logoSound = [NSSound soundNamed: @"logoSound"]; [logoSound play]; thanks! regards Jonathan Chacón El 08/03/2010, a las 12:20, Keith Blount escribió: > NSSound doesn't respond to -initWithContentsOfFile: (it responds to > -initWithContentsOfFile:byR

Re: problems loading a sound with NSSound

2010-03-08 Thread Keith Blount
NSSound doesn't respond to -initWithContentsOfFile: (it responds to -initWithContentsOfFile:byReference:), so you should be seeing errors on the console if that is how you are trying to init your NSSound object. (Also note that in the code you posted there is a memory leak, so it would be better

Re: problems loading a sound with NSSound

2010-03-07 Thread James W. Walker
On Mar 7, 2010, at 8:26 PM, Jonathan Chacón wrote: > I added a sound file to the resources of my project ( logoSound.AIF ) > > I use this function to load the resource: > > -(NSSound*) getSound:(NSString *) sndValue { > NSBundle *bundle = [ NSBundle bundleForClass: [ self class ] ]; >

problems loading a sound with NSSound

2010-03-07 Thread Jonathan Chacón
Hello, I added a sound file to the resources of my project ( logoSound.AIF ) I use this function to load the resource: -(NSSound*) getSound:(NSString *) sndValue { NSBundle *bundle = [ NSBundle bundleForClass: [ self class ] ]; NSString *sndName = [ bundle pathForResource: sndVal