Carl is correct -

- you're probably hearing the remainder of an mp3 'block' in the sound buffers.

Use stop() instead in the mouseDown & that should get cleared out.

then just play using a #startTime = to the currentTime that you want in the mouseUp handler.

hth
-Buzz


At 11:49 PM -0500 2/18/03, you wrote:
Slava Paperno wrote:
 ...
 The slider I've slapped together shows an annoying quirk: when I drag the
 thumb and release it, the sound momentarily goes back to where it was
 before I clicked the thumb, and only then is cued to where I want it to be.
 I don't know what I'm doing wrong:

 I pause the sound channel on mouseDown: sound(1).pause()

 I then resent sound(1).currentTime to the new position.

 On mouseUp, I resume playbaclk: sound(1).play()

 Yet the actual currentTime is not reset until *after* the playback resumes,
 so I hear a fraction of a second played, then the audio is cued to where I
 want it, and then continues playing.
Maybe it's my D4 roots showing and there _is_ a 'real' answer, but this is a workaround I would try:

My guess is that you are getting artifacts from the chunky compression of MP3 in that some or all of the unplayed portion of the chunk you paused in is still in memory when you issue play().

So, Avoid the pause().

on mouseDown, set the volume to 0

on mouseUp, set the currentTime according to the position, and set the volume back to what it was. You might want to issue another play(), just in case the sound reached its end while the user was playing with the slider.


This is a seat-of-the-pants, off-the-top-of-my-head idea.
No guarantees, your mileage will undoubtedly vary.
--
Carl West [EMAIL PROTECTED] http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
- Isabella, Measure for Measure, Act 3 Scene 1
-
[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