Re: At my wits end with NSSound!
Re: At my wits end with NSSound!
- Subject: Re: At my wits end with NSSound!
- From: "Tregaskis, Wade" <email@hidden>
- Date: Wed, 11 Feb 2004 15:25:45 +1100
>
mySound = [[NSSound soundNamed:@"aSound"] retain];
>
>
Then
>
>
[mySound play];
This is how I use sounds in my current project, and it seems to work fine. There's no audible delay nor significant CPU usage peak at the first play.
People have complained about the first-play delays many times before, I know, but I was under the impression that it was a problem on all machines. Now that I'm using NSSound myself I don't see it.
The sounds I'm playing are very small - I'll check exactly how-so when I get home tonight. I'm guessing that sounds above a certain size threshold (1k - 4k ?) might be triggering some kind of buffering mechanism - have you tried using tiny placeholder sounds for comparison?
Has anyone tested if the delay they see is in any way variable, and if so whether it seems related to the size/complexity of the sound in question?
Does anyone at Apple have an official stance or suggestion? I seem to recall this being a sour point previously.
Wade Tregaskis
_______________________________________________
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.