[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] swfc regression in sound reading ?
From: |
Matthias Kramm |
Subject: |
Re: [Swftools-common] swfc regression in sound reading ? |
Date: |
Thu, 2 Dec 2010 11:37:47 -0800 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Tue, Nov 30, 2010 at 09:11:02AM +0100, strk <address@hidden> wrote:
> The offending line is:
>
> .sound audio "sound1.wav"
>
> This is used in a testcase of GNU Gnash and is giving different results
> on different machines. Ie:
>
> FAIL: snd.duration: expected: "13740" , obtained: "13766" [sound.sc:25]
I can not reproduce this using the latest git version-
i.e., using the following (simple) swfc file:
.flash bbox=200x200 filename="sound_test.swf" version=6 fps=30
.sound audio "sound1.wav"
.action:
snd=new Sound();
snd.attachSound("audio");
trace("Sound duration is: ");
trace(snd.duration);
trace("Correct value should be 13740");
.end
.end
When running the following commands:
swfc sound_test.sc
flashplayer sound_test.swf
This output is generated:
Sound duration is:
13740
Correct value should be 13740
The sound file has 110000 samples at 8000 Hz. swfc will resample it to
be 44100 Hz (resulting in 606375 samples), pad it to be a multiple of
1125 (for mp3 compression, giving a total of 607104 samples at 44100 Hz).
MP3 encoded, this results in 263 blocks at 11025 Hz, of 576 (stereo)
samples each, 576 * 263 / 11.025 = 13740.408163265306 milliseconds in
total, which leads me to believe the 13740 value is the correct one.
Could you send me a SWF file that has a bad sound length?
Matthias