Re: Cocoa Sounds

2009-11-11 Thread Mark Gallegly
That's a shame, sounds of silence always seem to work for Simon & Garfunkel. On Nov 10, 2009 11:56 PM, "Chunk 1978" wrote: i have a launch sound of silence already implemented in my code, but it doesn't always work for some reason. On Wed, Nov 11, 2009 at 2:39 AM, Mark Gallegly wrote: > That's

Re: Cocoa Sounds

2009-11-10 Thread Chunk 1978
i have a launch sound of silence already implemented in my code, but it doesn't always work for some reason. On Wed, Nov 11, 2009 at 2:39 AM, Mark Gallegly wrote: > That's a good idea. Someone should of suggested that before. > > On Nov 10, 2009 11:36 PM, "mlist0...@gmail.com" > wrote: > > What

Re: Cocoa Sounds

2009-11-10 Thread Mark Gallegly
That's a good idea. Someone should of suggested that before. On Nov 10, 2009 11:36 PM, "mlist0...@gmail.com" wrote: What I've done in the past is to simply play a silent sound before I actually need to play a sound for real. This "primes the pump". _murat On Nov 9, 2009, at 11:40 AM, lbland wr

Re: Cocoa Sounds

2009-11-10 Thread mlist0...@gmail.com
What I've done in the past is to simply play a silent sound before I actually need to play a sound for real. This "primes the pump". _murat On Nov 9, 2009, at 11:40 AM, lbland wrote: > hi- > > On Nov 9, 2009, at 12:58 PM, Chunk 1978 wrote: > >> one thing i've always had an issue with is soun

Re: Cocoa Sounds

2009-11-10 Thread lbland
hi- On Nov 9, 2009, at 12:58 PM, Chunk 1978 wrote: 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 Calcul

Re: Cocoa Sounds

2009-11-10 Thread Sean McBride
On 11/9/09 7:43 PM, Chunk 1978 said: >regardless, is this NSSound lag a filed bug? I don't know. Did you file it? :) If it's important to you, you should file a bug regardless of whether it's important to anyone else. Duplicates increase priority. -- __

Re: Cocoa Sounds

2009-11-10 Thread James Walker
Damien Cooke wrote: Hi all, I may be way off but in my iPhone game I used SystemSoundID and AudioServicesCreateSystemSoundID I am not sure if that is helpful at all but it did not seem to have a delay but it does not support many formats either. So if you are happy to convert your format this

Re: Cocoa Sounds

2009-11-09 Thread Damien Cooke
Hi all, I may be way off but in my iPhone game I used SystemSoundID and AudioServicesCreateSystemSoundID I am not sure if that is helpful at all but it did not seem to have a delay but it does not support many formats either. So if you are happy to convert your format this may be an optio

Re: Cocoa Sounds

2009-11-09 Thread Matt Neuburg
On Mon, 9 Nov 2009 14:16:14 -0500, "Sean McBride" said: >On 11/9/09 10:50 AM, Jens Alfke said: > >>I ran into this too. A decent workaround is to preload the sound: >>create an NSSound object for the audio file you want to play, set its >>volume to zero, then play it. After that it's "warmed up" a

Re: Cocoa Sounds

2009-11-09 Thread Jens Alfke
On Nov 9, 2009, at 4:43 PM, Chunk 1978 wrote: i've also only read about the complexity of OpenAL, which i assume is even more low level in the sense that CoreAudio to OpenAL it's anologous to CoreAnimation to OpenGL. Not really; it might even be the other way around. OpenAL is a cross- platf

Re: Cocoa Sounds

2009-11-09 Thread Chunk 1978
i've also only read about the complexity of OpenAL, which i assume is even more low level in the sense that CoreAudio to OpenAL it's anologous to CoreAnimation to OpenGL. regardless, is this NSSound lag a filed bug? it's seems really unfortunate that there is a 1-second lag in loading/executing a

Re: Cocoa Sounds

2009-11-09 Thread Jens Alfke
On Nov 9, 2009, at 3:35 PM, Chunk 1978 wrote: thanks. haven't had time to test the workaround yet. i'll check out coreaudio. You really don't want to get into CoreAudio unless you're planning on doing some serious audio work. The APIs are low-level and complex and will take quite a whi

Re: Cocoa Sounds

2009-11-09 Thread Chunk 1978
thanks. haven't had time to test the workaround yet. i'll check out coreaudio. On Mon, Nov 9, 2009 at 6:32 PM, Sean McBride wrote: > On 11/9/09 6:25 PM, Chunk 1978 said: > >>so, is there some other lightweight 3rd party framework that could >>substitute for cocoa's NSSound? > > Did you try the

Re: Cocoa Sounds

2009-11-09 Thread Sean McBride
On 11/9/09 6:25 PM, Chunk 1978 said: >so, is there some other lightweight 3rd party framework that could >substitute for cocoa's NSSound? Did you try the workaround Jens and I suggested? Did you look at CoreAudio, as I also suggested? There's also:

Re: Cocoa Sounds

2009-11-09 Thread Chunk 1978
so, is there some other lightweight 3rd party framework that could substitute for cocoa's NSSound? On Mon, Nov 9, 2009 at 2:40 PM, lbland wrote: > hi- > > > On Nov 9, 2009, at 12:58 PM, Chunk 1978 wrote: > > one thing i've always had an issue with is sound lag, which always >> (yet only) happen

Re: Cocoa Sounds

2009-11-09 Thread Sean McBride
On 11/9/09 10:50 AM, Jens Alfke said: >I ran into this too. A decent workaround is to preload the sound: >create an NSSound object for the audio file you want to play, set its >volume to zero, then play it. After that it's "warmed up" and will >play instantly. I just tried this, and it seems to w

Re: Cocoa Sounds

2009-11-09 Thread Chunk 1978
i dont' believe there are any special processes running, but this iMac has always had issues since i got it. i've had it "fixed" 3 times for problems concerning the screen and video card, it's broken again so i'm scheduled to have it entirely replaced. perhaps there are some other underlying issu

Re: Cocoa Sounds

2009-11-09 Thread Sean McBride
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

Re: Cocoa Sounds

2009-11-09 Thread Jens Alfke
I ran into this too. A decent workaround is to preload the sound: create an NSSound object for the audio file you want to play, set its volume to zero, then play it. After that it's "warmed up" and will play instantly. (Actually not entirely instantly on laptops, which will turn off the a

Re: Cocoa Sounds

2009-11-09 Thread Klaus Backert
On 9 Nov 2009, at 19:25, Chunk 1978 wrote: humm... i'm running 10.5.8 on 2008 iMac C2D, but i never though it could have been the computer. would like to hear from others. Did you check whether there are certain "special" processes running on your machine? Klaus

Re: Cocoa Sounds

2009-11-09 Thread Chunk 1978
also, i tried implementing a dummy sound (dead air .m4a file) during application launch, but that didn't help. the first real sound is still always lagged. On Mon, Nov 9, 2009 at 1:37 PM, Chunk 1978 wrote: > i'm using Cocoa's NSSound. here's is how i play sounds: > > -=-=-=-=- > > if ([[soundR

Re: Cocoa Sounds

2009-11-09 Thread Dave DeLong
That makes sense, because NSSound has to go find the resource named "mySound.m4a", load it into memory, and then play it. Have you tried preloading the sound, so that by the time you want to play it, it's already in memory? Dave On Nov 9, 2009, at 11:37 AM, Chunk 1978 wrote: i'm using Co

Re: Cocoa Sounds

2009-11-09 Thread Chunk 1978
i'm using Cocoa's NSSound. here's is how i play sounds: -=-=-=-=- if ([[soundRadioGroup cellWithTag:1] state] == NSOnState) { NSSound *theSound = [NSSound soundNamed:@"mySound.m4a"]; if ([theSound isPlaying]) [theSound stop]; [theSound play]; } -=-=-=-=- the first sound is always lagg

Re: Cocoa Sounds

2009-11-09 Thread Shawn Erickson
On Mon, Nov 9, 2009 at 10:25 AM, Chunk 1978 wrote: > humm... i'm running 10.5.8 on 2008 iMac C2D, but i never though it > could have been the computer. would like to hear from others. What sound API are you using? -Shawn ___ Cocoa-dev mailing list

Re: Cocoa Sounds

2009-11-09 Thread Chunk 1978
humm... i'm running 10.5.8 on 2008 iMac C2D, but i never though it could have been the computer. would like to hear from others. On Mon, Nov 9, 2009 at 1:18 PM, Klaus Backert wrote: > > On 9 Nov 2009, at 18:58, Chunk 1978 wrote: > >> one thing i've always had an issue with is sound lag, which al

Cocoa Sounds

2009-11-09 Thread Chunk 1978
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 > Spe