sound_win

  Sound Latency on Windows
sound




  Sound Latency on Windows
>>Issue: Sound Latency on Windows
>>Subject: button sounds played on top of background sounds.
>
>
>Much of what Tab says is good to know, but doesn't help fix your 
>problem, unless Beatnik would solve the problem, but it would be a 
>shame to have to go to so much trouble when you don't have to.
>
>The way I've been solving it is like this:
>
>on startmovie
>   if the sounddevice <> "qt3mix" then set the sounddevice = "qt3mix"
>   if the sounddevice <> "qt3mix" then set the sounddevice = "directsound"
>end
>
>
>Testing to see if the sounddevice is already qt3mix will save some 
>time when coming back to this movie from somewhere else. If 
>QuickTime 3 or 4 is installed, qt3mix will be selected before you 
>get to the second line. If it's not, the second line will attempt to 
>use directsound. Here's the outcome of it all:
>
>On a Mac, nothing will change, you'll still be happily on MacSoundManager
>
>On Windows 95/98/NT/2000 with QuickTime 3 or 4 installed, you'll get 
>good sound mixing, and hardly any latency.

minor addendum:
If you are on NT and use QTMIX, there will still be plenty of 
latency, because Quicktime  can't use DirectSound, because 
DirectSound doesn't run under NT.
(The second 'if' statement will fail because Director will not let 
you turn on a crummy version of directsound (such as is present on 
most flavors of NT).

>On Windows 95/98/2000 with DirectSound installed, but no QuickTime, 
>you'll be on directsound and should get good mixing.
>
>On Windows NT with no QuickTime installed you'll be on macromix, and 
>will be no worse off than you are at the moment.
>
>
>So, rather than disable the whole feature, make an attempt to use a 
>good sound mixer and if that fails, just let the user suffer.




I guess you didn't understand either my Lingo or my explanation. Here 
it is in slow motion:

on startmovie
    --mac is on macsoundmanager, windows is on directsound if it is 
supported, macromix otherwise
    if the sounddevice <> "qt3mix" then set the sounddevice = "qt3mix"
    --mac same, all windows that have QT3 or 4 are on qt3mix, the rest 
still on macromix
    if the sounddevice <> "qt3mix" then set the sounddevice = "directsound"
    --mac same, any windows that had QT3 or 4 are the same, any that 
didn't will try directsound
end


The QuickTime mixer I was talking about is QT3Mix, not QTMix 
(whatever that is), and doesn't have bad latency. The second if 
statement will do nothing if you have QuickTime 3 or 4, and will 
attempt to use DirectSound if you don't have QT3 or 4. If you are on 
NT, where DirectSound isn't supported, you end up on MacroMix, which 
is no worse off than you would be if you attempted no fix at all.

If you have a preference for DirectSound over QuickTime, you could 
rearrange the checks like this:

on startmovie
    if the sounddevice <> "QT3Mix" and the sounddevice <> 
"DirectSound" then set the sounddevice = "QT3Mix"
end

That would take care of most needs in one line. If the machine has a 
Director supported DirectSound, it will probably be set already, so 
the single line check will only set QT3Mix if you are on a system 
that doesn't have a good enough DirectSound.

Excuse me if I sound over confident in QT3Mix's lack of latency, I've 
just finished five months of developing five NT based kiosks that 
have plenty of simultaneous sounds, including ones triggered by the 
user pressing on things, and they seem to trigger the sounds right 
away.

Home shock + cgi Bits 'n pieces Director Lingo ShockLets Contact