• 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 won't play wave files???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSound won't play wave files???


  • Subject: Re: NSSound won't play wave files???
  • From: Jason Bobier <email@hidden>
  • Date: Mon, 07 Jul 2008 03:06:09 -0400

Hey Charles,

I just did and that worked fine, so at least I have a work around. :-)

Jason

On Jul 7, 2008, at 3:01 AM, Charles Srstka wrote:

On Jul 7, 2008, at 1:53 AM, Jason Bobier wrote:

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???

Since it works in QuickTime Player, have you tried using QTMovie instead of NSSound to play the file?


Charles

_______________________________________________

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


References: 
 >NSSound won't play wave files??? (From: Jason Bobier <email@hidden>)
 >Re: NSSound won't play wave files??? (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: NSSound won't play wave files???
  • Next by Date: Re: garbage collection and NSConnection
  • Previous by thread: Re: NSSound won't play wave files???
  • Next by thread: Re: NSSound won't play wave files???
  • Index(es):
    • Date
    • Thread