NSSound won't play wave files???
NSSound won't play wave files???
- Subject: NSSound won't play wave files???
- From: Jason Bobier <email@hidden>
- Date: Mon, 07 Jul 2008 02:53:02 -0400
Has anyone else had issues playing wave files with NSSound? Not only
does it refuse to play the file (even tho I can open it with the
Quicktime Player and play it), but it fails to error. It simply
doesn't make a sound. AIFF files seem to play just fine. Here is the
code in a generic project.
@implementation TestController
- (void)awakeFromNib
{
BOOL success;
NSSound *sound = [[NSSound alloc] initWithContentsOfFile:@"/Users/
jason/Desktop/306.wav" byReference:YES];
// NSSound *sound = [[NSSound alloc] initWithContentsOfFile:@"/Users/
jason/Desktop/306.aif" byReference:YES];
success = [sound play];
NSLog(@"%d", (int)success);
}
@end
Very straight forward. The sound allocs and inits just fine and
success is YES after play is called. Not only does it fail to make a
sound, but it also fails to call my sound finished delegate.
Looking in the Console, I get this mysterious error:
7/7/08 2:41:51 AM Test[29698] com.apple.console Warning 1
whenever the sound is played.
Any ideas???
Thanks!
Jason
_______________________________________________
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