Wed 15 Jan 2014 01:17:42 AM UTC, comment #14:
In addition to the gap in the audio, the sound continues to play even after clicking "clear" or unselecting the instrument. I'm using Gnash 0.8.10.
|
Mon 16 May 2011 12:26:58 PM UTC, comment #13:
See also bug #33323 which sounds related
|
Wed 08 Jul 2009 08:37:25 AM UTC, comment #12:
The playhead value just keeps going up and up now.
|
Thu 09 Oct 2008 06:57:53 AM UTC, comment #11:
Beside, the dox for sound_handler::play_sound are incorrect, they refer to streaming sound for both 'secondOffset' and 'start' parameter, while they are likely used for different purposes (one for streaming sounds, one for event sounds).
Also units don't convince me.
|
Thu 09 Oct 2008 06:55:12 AM UTC, comment #10:
Doesn't look like we're really using the first parameter passed to Sound.start (offset).
It goes trough the sound_handler, gets set into active_sound::offset, but doesn't then seem to be used at all.
|
Wed 08 Oct 2008 09:09:07 PM UTC, comment #9:
So if the sounds are getting out of sync with each other, and more importantly the playhead (silent wav), this should be because Gnash treats them as having a different length. There's no syncing mechanism at all besides the length of the tracks. The onSoundComplete() call relies on the partial track length from its starting position also being correct. I hope I've understood that right.
|
Wed 08 Oct 2008 09:02:44 PM UTC, comment #8:
From the author (Carlos Nazareno):
All of the sound samples are of exactly the same length, so that they
synch perfectly when they loop.
Next, I have a silent WAV file that's exactly the the same length as
all the other sound clips. This silent sound clip is what I use to
synch all of the other looping sound samples. This silent clip just
keeps playing looped, and then I just keep reading its Sound.position,
and this value is what I call the "playhead". The playhead value is
the position at which any of the other sound clips will start playing
when one of the trigger buttons in the SWF is pressed. All of the
other sounds are set to synchronize with silence_Master.wav, and thus
will all synch with each other when triggered.
Next, the triggered sounds:
I set them to start playing at the playhead's position in
milliseconds, and then when they finish playing, I trigger
onSoundComplete() and then have them just play from the beginning and
start looping 1000 times.
(file #16631)
|
Wed 08 Oct 2008 08:26:12 PM UTC, comment #7:
The position value doesn't correspond to the sound, that is.
|
Wed 08 Oct 2008 08:25:37 PM UTC, comment #6:
The duration is fixed, but not the other bugs. The gap is still there, and the playhead loop (position) doesn't correspond to the loop.
|
Wed 08 Oct 2008 07:39:27 AM UTC, comment #5:
oh I see now, there's no seek, the code only requests
to start the sound at offset 0 and loop 1000 times.
Carlos: is onSoundComplete expected to be called at the end
of all loops or only at the end of each iteration in it ?
|
Wed 08 Oct 2008 07:35:21 AM UTC, comment #4:
duration bug fix committed as revision 9954.
Now for the loop.
Carlos: I see onSoundComplete being used, but I know gnash doesn't support it and still loops. So, is the onSoundCOmplete only used for seeking 1 second into the sound ?
|
Wed 08 Oct 2008 07:22:42 AM UTC, comment #3:
silence_Master.wav is the symbol name for a DEFINESOUND:
Offset: 64 (0x0040)
Block type: 14 (SWF_DEFINESOUND)
Block length: 57625
CharacterID: 1
SoundFormat: MP3
SoundRate: 22 KHz
SoundSize: 16-bit
SoundType: Stereo
SoundSampleCount: 156800
Mp3: SeekSamples 1670
Carlos, can you confirm it's an MP3, despite the name ?
Here's how gnash computes duration:
unsigned int ret = sampleCount / sampleRate * 1000;
ret += ((sampleCount % sampleRate) * 1000) / sampleRate;
if (sounddata->soundinfo->isStereo()) ret = ret / 2;
If we don't divide by 2 when the sound is stereo we return the correct value.
|
Wed 08 Oct 2008 07:01:27 AM UTC, comment #2:
Marking as important as we have the SWF author handy.
onSoundComplete isn't implemented yet, shouldn't be too hard
to do.
|
Wed 08 Oct 2008 06:44:56 AM UTC, comment #1:
var silent = new Sound();
silent.attachSound('silence_Master.wav');
[...]
this.onEnterFrame = function (Void) {
traceBox = ((silent.position+'/')+silent.duration)+'ms Playhead';
};
silent.duration is evidently wrong, and silent.position is out of sync with what's playing.
|
Wed 08 Oct 2008 06:40:54 AM UTC, original submission:
http://www.object404.com/music
The playhead total with Gnash is 3555ms, with the pp 7111. The loop of the numbers bears no relation to the sound loop, unlike the pp.
When Gnash finishes the loop there is a short gap before it restarts, so that the rhythm is interrupted.
On the pp the end of the loop also takes very slightly too long (may be the design of the SWF), but it's not as noticeable as Gnash.
|