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 s...@rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com