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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to