Re: Cocoa Sounds
Re: Cocoa Sounds
- Subject: Re: Cocoa Sounds
- From: "Sean McBride" <email@hidden>
- Date: Mon, 9 Nov 2009 13:51:01 -0500
- Organization: Rogue Research Inc.
On 11/9/09 12:58 PM, Chunk 1978 said:
>one thing i've always had an issue with is sound lag, which always
>(yet only) happens during a first sound. after the initial lag,
>sounds will play on time. at first i though it was my code, but
>recently i've noticed that it happens in Calculator.
>
>if you open Calculator, then choose Speech > Speak Button Pressed,
>you'll notice a lag when you first press a button.
>
>how is it possible to avoid this? are there other 3rd frameworks for
>sound that would be more ideal to use other than what's available in
>cocoa?
I have this problem too. It even happens with NSBeep (which someone
posted about the other day). Maybe you could 'preflight' your sound by
calling setVolume:0.0 then playing it, then restoring the volume. (Of
course, the VM system may page out your sound later anyway...). Perhaps
CoreAudio has a better solution.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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