NSSound
NSSound
- Subject: NSSound
- From: Steve Mills <email@hidden>
- Date: Wed, 6 Nov 2002 20:32:26 -0600
This works:
NSSound* snd = [NSSound alloc];
[snd retain];
[snd initWithContentsOfFile: fileName byReference: NO];
[snd play];
But this doesn't:
NSMutableData* data = [[NSMutableData dataWithContentsOfFile:
fileName] retain];
NSSound* snd = [[NSSound alloc] retain];
[snd initWithData: data];
[snd play];
The first [snd play] returns YES but the second returns NO. If it's the
same data, why does only the first method work? I even tried naming the
sound in the second method.
And while I'm here, is there a way to display memory of a variable
while debugging with Project Builder like you can with CodeWarrior's
Display Memory menu item? Displaying variables in PB is woefully
inadequate.
Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/
_______________________________________________
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.