Delay on first playsound (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Grabbing Data Between Two Key Words...
Next thread: [OT] XML spec notation question


[OT] more Carbon shared library tales   -   Hadley, Joshua
  Delay on first playsound   -   Andrea Suraci
   Re: Delay on first playsound   -   Frank Bitterlich
    Re: Delay on first playsound   -   Andrea Suraci
     Re: Delay on first playsound   -   Joseph J. Strout
      Re: Delay on first playsound   -   Andrea Suraci

Delay on first playsound
Date: 13.12.02 22:47 (Fri, 13 Dec 2002 22:47:18 +0100)
From: Andrea Suraci
Hello all,

I've noticed some delay with the first playsound in my application:
everything in my application just stops, the cursor changes to the
beachball and after a second or two finally the sound plays. Is it some
kind of initialization routine (as it only happens once per session)? I
guess it is not related to QT as those are sys7 sounds...

I am using 4.5.2 on OS X 10.2.

Andrea Suraci

---
"Life is what happens to you while you're busy making other plans"
- John Lennon

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: Delay on first playsound
Date: 13.12.02 23:13 (Fri, 13 Dec 2002 23:13:41 +0100)
From: Frank Bitterlich
Probably your app loads the sound from the resource fork; if your HD
went to sleep before, it has to spin up, that could cause a further
delay. See the thread about the "Slow Tips Window", the RB IDE appears
top have the same problem ;)

Cheers,
Frank+++

Andrea Suraci wrote:
>
> Hello all,
>
> I've noticed some delay with the first playsound in my application:
> everything in my application just stops, the cursor changes to the
> beachball and after a second or two finally the sound plays. Is it some
> kind of initialization routine (as it only happens once per session)? I
> guess it is not related to QT as those are sys7 sounds...

Re: Delay on first playsound
Date: 14.12.02 00:30 (Sat, 14 Dec 2002 00:30:39 +0100)
From: Andrea Suraci
Thanks Frank, I've just read the thread about the tips window and I
guess this must be the same problem, and since it appears in the IDE
itself it's probably a good subject for a bug report.
Anyway, I'd be glad to be wrong on this.

Cheers,
-Andrea Suraci

On Friday, December 13, 2002, at 11:13 pm, Frank Bitterlich wrote:

> Probably your app loads the sound from the resource fork; if your HD
> went to sleep before, it has to spin up, that could cause a further
> delay. See the thread about the "Slow Tips Window", the RB IDE appears
> top have the same problem ;)
>
> Cheers,
> Frank+++
>
> Andrea Suraci wrote:
>>
>> Hello all,
>>
>> I've noticed some delay with the first playsound in my application:
>> everything in my application just stops, the cursor changes to the
>> beachball and after a second or two finally the sound plays. Is it
>> some
>> kind of initialization routine (as it only happens once per session)?
>> I
>> guess it is not related to QT as those are sys7 sounds...
>

---
"Life is what happens to you while you're busy making other plans"
- John Lennon

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: Delay on first playsound
Date: 14.12.02 00:44 (Fri, 13 Dec 2002 15:44:42 -0800)
From: Joseph J. Strout
At 12:30 AM +0100 12/14/02, Andrea Suraci wrote:

>Thanks Frank, I've just read the thread about the tips window and I
>guess this must be the same problem, and since it appears in the IDE
>itself it's probably a good subject for a bug report.

I don't see what bug there is to report -- resources are loaded in a
"lazy" fashion by the system, and unloaded (purged) too as the OS
sees fit. It's just like virtual memory but on a smaller scale.
Everything is working as it's intended to. Normally you don't see
much hesitation when loading a sound, but of course if it has to spin
up the hard drive then it will take longer. Not much we can do about
that.

But perhaps you could put in a feature request for some way to
pre-load a sound (though I suspect you could already do this by
setting the volume to 0 and playing it).

Cheers,
- Joe

Re: Delay on first playsound
Date: 14.12.02 01:24 (Sat, 14 Dec 2002 01:24:42 +0100)
From: Andrea Suraci

On Saturday, December 14, 2002, at 12:44 am, Joseph J. Strout wrote:

> I don't see what bug there is to report -- resources are loaded in a
> "lazy" fashion by the system, and unloaded (purged) too as the OS sees
> fit. It's just like virtual memory but on a smaller scale. Everything
> is working as it's intended to. Normally you don't see much
> hesitation when loading a sound, but of course if it has to spin up
> the hard drive then it will take longer. Not much we can do about
> that.
>
> But perhaps you could put in a feature request for some way to
> pre-load a sound (though I suspect you could already do this by
> setting the volume to 0 and playing it).

Thank you Joe, really helpful. I'll find a way to pre-load a sound in
my splash screen.

Cheers,
-Andrea Suraci

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>