Don't stop audio streams in run_frame_internal to prevent audio stutter. Close #3817#3819
Don't stop audio streams in run_frame_internal to prevent audio stutter. Close #3817#3819desuwa wants to merge 1 commit intoruffle-rs:masterfrom desuwa:issue-3817
run_frame_internal to prevent audio stutter. Close #3817#3819Conversation
run_frame_internal to prevent audio stutter.run_frame_internal to prevent audio stutter. Close #3817
seanpm2001
left a comment
There was a problem hiding this comment.
Looks good, explanation makes sense. Let's see if this actually fixes the problem.
|
This code is handling the case where there is a legit gap in streaming audio, such as the following example: As you note, high framerate movies will often get SoundStreamBlock tags clumped together into alternating frames, but you can also have gaps in the track itself, which will also appear as a large region missing SoundStreamBlock tags. I'm not 100% sure how Flash handles or differentiates these cases, hence the uncertainty in the original comments. Perhaps this should only stop the sound if there are several (2? 3?) frames without a SoundStreamBlock, instead of a single frame. Flash itself also does weird/buggy things when this occurs. For example, here's the above SWF with the stream bitrate set to 8kbps. The official Flash Player will play it with a gap, but too small of a gap -- it will play too soon and appear out of sync. |
|
Ah, right. So the stream is actually just like a normal sound with all the data already available and the playback starts at the first first I'm going to close this I guess as it's probably not fixable without changing how streams work :( |
Related issue #3817
This seems safe to do since sound instances will still get pruned normally by the audio manager once they have finished playing, as far as I understand.