ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.65k stars 811 forks source link

Wrong behaviour when sampling rate informations don't match #18389

Open Klymins opened 1 week ago

Klymins commented 1 week ago

Describe the bug

When the sampling rate field of the DefineSound tag does not match the sampling rate of the MP3 file, the original Flash Player decodes the MP3 at the sampling rate that is defined by the tag but with the same speed as just decoding the MP3 with the builtin informations, but Ruffle ignores the sampling rate field of the DefineSound tag. Ruffle should be updated to give the same sound with the original Flash Player.

Expected behavior

Ruffle should decode the MP3 at the sampling rate that is defined by the tag but with the same speed as just decoding the MP3 with the builtin informations, so it should give the same sound with the original Flash Player.

Content Location

srunmatch.zip

Affected platform

Online demo

Operating system

Windows 10

Browser

Opera 95

Additional information

No response

n0samu commented 1 week ago

Sounds somewhat similar to #6673

Klymins commented 1 week ago

Sounds somewhat similar to #6673

I think it's not. Ruffle should use both the sampling rate information of the MP3 stream itself and the sampling rate field of the DefineSound tag as I described to give the same sound with the original Flash Player.