At 4:53 PM +1100 1/9/03, you wrote:
Hi,

I am authoring on a Mac but I remember from a couple of years ago that
PCs used to have a latency issue when playing sounds (i.e.. there was a
delay between the command and the sound when using puppetSound).

 I understand that using the queue() command eliminates this delay
because it preloads a part of the sound. However I was wondering if this
still holds when the play() command is used in the line directly after
the queue() command.

e.g..

 sound(1).queue( member(soundCastMember) )
 sound(1).play()

I have quite a number of sound effects (I guess eventually a dozen or
two or three or four). So far their individual duration is between 0.3
sec and 1.5 sec. Which sound plays will depend on what the user has just
done, so I don't think queuing a whole lot of sounds, and therefore
pleloading them, would work because I never know what sound will be
needed next. (Also, partly because it is a web project, just preLoading
all the sounds with something like preLoadMember is probably not a good
idea because of loading delays at the beginning of the movie)

Unfortunately I don't have a PC to test this on and the Mac does not
seem to have this latency issue.

To sum up, my questions are:

1) Will using queue() followed by play() as in the example above solve
the latency issue or does there need to be some time between the two
commands to allow for the bit of preload.
If one calls play immediately, there's really very little difference from the single line sound().play(member(soundCastMember))

- the real advantage of queue comes when you do

sound().queue(memberA)
sound().queue(memberB)
sound().queue(memberC)
sound().play()

or

sound().setPlaylist([[#member: memberA], [#member: memberB], [#member: memberC]])
sound().play()

2) And is latency still an issue on PCs?
The latency issue was largely resolved by two things:
1. MACR's creation of the directSound Xtra (included with the Windows product).
2. MS now includes directSound as standard within their contemporary operating systems.

So

1. Remember to include the DirectSound Xtra in your Window projector and Director will default to use it if it's available. Also include Macromix.x32 to fall back on if it's not (this is the one with the latency).

2. Finally, add this line in your prepareMovie handler to handle the case of directSound not being available (is the WinOS = NT):
if the soundDevice = "Macromix" then the soundDevice = "QT3Mix"
-- if directSound is unavailable, the soundDevice will drop to Macromix, and in this case you can substitue the QT3Mix soundDevice if QuickTime is present. It's better than Macromix, but not as good as directSOund, since it's dependent on QuickTime.
3. Be sure to include the QTAsset.x32 Xtra, which contains the QTMix soundDevice within it.

This will get you low latency unless you're on an NT system that doesn't have QT installed.



3) As a follow on: Does puppetSound need to load the whole sound before
it can play (whereas queue() just preLoads the first 1.5 sec by default?
- though most of my sounds are no longer than this anyway.)
not really - puppetSound is now just an alias
-> the code just calls sound.play()

hth
-Buzz


Cheers,
John
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to