Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 114 - Incorrect sound stream encoding for slow frame rates. #33

Open
netsweng opened this issue Aug 18, 2013 · 0 comments
Open

Bug 114 - Incorrect sound stream encoding for slow frame rates. #33

netsweng opened this issue Aug 18, 2013 · 0 comments

Comments

@netsweng
Copy link
Member

Benjamin Wolsey 2011-07-01 07:22:20 EDT

Setting an mp3 sound stream for a SWF with a very slow frame rate (e.g. 1 or
0.5 frames per second) results in the stream sound blocks containing much more
data than they claim to.

With a sample rate of 44kHz, a frame rate of 0.5 frames per second means each
sound block contains 88000 stereo samples, but both the sound stream head and
each sound stream block advertise a maximum of about 22000. I guess there is an
integer overflow somewhere.

Because the pp uses the value in the sound stream head to determine the frame
rate while a streaming sound is playing, this means that the SWF plays at 2
frames per second.

Also, because the sample count in each block is used to determine how much
sound is played, the sound is truncated.

All samples count value is a uint16_t, so if this is to work properly, I guess
that several smaller blocks would have to be added between each showframe until
all samples are written.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant