I'm trying to understand why the Flash player isn't playing my audio
properly. It's muting output during the first frame. I need to fix
that.
It also mutes output during the frame after an ActionGotoFrame. I
also need to fix that.
I'm using Flash 8 on Mac OS X 10.4.7; other testers report the same
problem on other hosts.
I have a simple SWF which contains just streaming audio formatted as
a single SoundStream. I created the file using an application that I
wrote. I've followed the SWF spec closely and I'm very confident
that the file format is correct. (It's certainly more correct than
files generated by ffmpeg and similar.)
Here's a brief dump of the file. (Note that this file uses a
framerate of 1 frame/sec to make the problem really obvious.)
Header: FWS version 4
File length: 480712
RECT: (xMin=0, xMax=6400, yMin=0, yMax=4000)
Frames/second: 1.00
Total frames: 31
SoundStreamHead2 (playbackSoundRate=3, playbackSoundType=1,
streamSoundCompression=2, streamSoundRate=3, streamSoundType=1,
StreamSoundSampleCount=44100, latencySeek=0)
SoundStreamBlock containing [Mp3SoundStreamData record;
sampleCount=43776 containing [Mp3SoundData record; seekSamples=0]]
---------- ShowFrame ----------
SoundStreamBlock containing [Mp3SoundStreamData record;
sampleCount=43776 containing [Mp3SoundData record; seekSamples=324]]
---------- ShowFrame ----------
SoundStreamBlock containing [Mp3SoundStreamData record;
sampleCount=43776 containing [Mp3SoundData record; seekSamples=648]]
---------- ShowFrame ----------
SoundStreamBlock containing [Mp3SoundStreamData record;
sampleCount=44928 containing [Mp3SoundData record; seekSamples=972]]
---------- ShowFrame ----------
SoundStreamBlock containing [Mp3SoundStreamData record;
sampleCount=43776 containing [Mp3SoundData record; seekSamples=144]]
... more like this ...
The problem is that the Flash player doesn't start playback with the
first frame. Instead, it mutes the output during the first frame,
then begins emitting sound with the second frame.
I suspect that this is a defect in all Flash players; I believe that
the player mutes the sound during the first frame after a Play or
ActionGotoFrame. I suppose that many people don't care -- what's the
loss of an audio frame here and there? But it matters in my
application because the output must be perfect.
Do you have any suggestions for resolving the problem? I'm
especially interested in fixing the problem where audio is muted
after an ActionGotoFrame. That's a killer.
thx!
-jeff stearns
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com