Re: At my wits end with NSSound!
Re: At my wits end with NSSound!
- Subject: Re: At my wits end with NSSound!
- From: Mike Brinkman <email@hidden>
- Date: Wed, 11 Feb 2004 07:55:25 -0500
This has typically been the answer I was getting from many of the guys @
iDevGames before the server went down. The only problem with this approach
is that it seems more like a "work-around" than a proper solution, but it
looks like I will have to resort to it.
Thanks for the offer of your sound file. I'll download it and check it out.
Out of curiosity, how would I make a "silent" sound? I'd rather have a
silent sound of about 4K instead of 30K if possible. My game is already
240K, and I'd rather not bloat it too much more.
Mike
On 2/11/04 12:01 AM, "John Pannell" <email@hidden> wrote:
>
Hi Mike-
>
>
I have also been bothered by the delay; here's what I did to clear it
>
up:
>
>
1. Make a "silent" sound. You can download mine (30K) at:
>
http://www.positivespinmedia.com/silent.aiff
>
>
2. Add it to the "Resources" folder of your project by selecting the
>
folder in XCode/PB and choosing "Add Files..." from the Project menu.
>
>
3. In some early method of your app, add a line to play the silent
>
sound. I used my controller object, which is a delegate for NSApp, and
>
added this line to the applicationDidFinishLaunching:
>
method, which is called when the application did finish launching
>
(hence the name :-)
>
>
// wake up the sound system
>
[[NSSound soundNamed:@"silent"] play];
>
>
Since adding this to the app (about five minutes ago) I have noticed
>
that the bothersome delay at the beginning of my game (a minesweeper
>
clone) is now gone. Yay! I'm glad you brought this up... I had seen
>
complaints at mamasam of this issue and recalled one person suggesting
>
the playing of a silent sound to "wake up" the sound output and
>
eliminate the delay. It seems to work.
>
>
Hope this helps!
>
>
john
_______________________________________________
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.