Re: Preloading sounds
Re: Preloading sounds
- Subject: Re: Preloading sounds
- From: Mike Brinkman <email@hidden>
- Date: Wed, 21 Jan 2004 11:35:50 -0500
I tried playing iTunes in the background, and it's definitely NOT a problem
with sound hardware gone to sleep.
I guess this is a known problem with both NSImage & NSSound, being that they
are slow/unresponsive. Learning Cocoa with Objective C had a method for
preloading images because NSImage is slow. I tried to do a similar thing
with NSSound, but it also didn't work.
I searched through the CocoaDev archive, I'm surprised that nobody has
brought this up before. Certainly there's got to be a way around this aside
from playing a silent sound?
On 1/21/04 1:44 AM, "m" <email@hidden> wrote:
>
On Jan 20, 2004, at 5:48 PM, Mike Brinkman wrote:
>
>
> I wrote a simple Tic Tac Toe game in Cocoa, and it works pretty well
>
> for the
>
> most part. The only real problem I'm encountering is that the first
>
> time I
>
> play a sound, there is a brief delay.
>
>
Betcha what's going on here is that the sound hardware has gone to
>
sleep and takes a moment to turn on. See if it doesn't happen if you
>
have iTunes playing something when your app makes sound.
>
>
A workaround I have used is to have a silent sound that I start playing
>
a moment before I'm likely to need a sound. You could also just
>
periodically play the sound to keep the sound hardware awake.
>
>
A less quick and dirty solution would be to programatically disable the
>
powering down of the sound system by the power manager. Have a gander
>
at the docs.
>
>
_murat
_______________________________________________
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.