You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NetStream stop via NetStream::close() or NetStream::dispose() cause sound crackling.
May be under hood AIR should send some extra data at NetStream::close() or NetStream::dispose() to audio decoder to prevent such behavior.
Reproduced with multiple AIR versions, even with latest AIR 51.0.1.1 with multiple different platforms (Windows, macOS, Android, iOS) with different devices, applications and videos.
Same issue in all cases. But with some audio devices (or audio drivers) and some videos/sound it not noticeable.
There is no such issue using many other (non-AIR) video/audio applications, especially wich uses ffmpeg.
Setting SoundTransform::volume to 0 just before NetStream::close() or NetStream::dispose() didn't help.
Playing with NetStreamAppendBytesAction.END_SEQUENCE just before NetStream::close() or NetStream::dispose() didn't help.
Didn't test with FLV videos.
Didn't test with Sound.
Launch application with code below. It just play video with audio in a loop. Click anywhere on stage to restart video (it will be stopped and new one started).
You need to click in a "correct" moment to hear crackling noticeable and clear. Please take a look at demonstration video below.
Found workaround.
After video playback change volume to mute (via soundTransform), wait ~30 frames (via ENTER_FRAME) and only after call NetStream::dispose().
But for iOS it doesn't work. Seems this issue #15 (comment)
Problem Description
NetStream
stop viaNetStream::close()
orNetStream::dispose()
cause sound crackling.May be under hood AIR should send some extra data at
NetStream::close()
orNetStream::dispose()
to audio decoder to prevent such behavior.Reproduced with multiple AIR versions, even with latest AIR 51.0.1.1 with multiple different platforms (Windows, macOS, Android, iOS) with different devices, applications and videos.
Same issue in all cases. But with some audio devices (or audio drivers) and some videos/sound it not noticeable.
There is no such issue using many other (non-AIR) video/audio applications, especially wich uses ffmpeg.
Setting
SoundTransform::volume
to0
just beforeNetStream::close()
orNetStream::dispose()
didn't help.Playing with
NetStreamAppendBytesAction.END_SEQUENCE
just beforeNetStream::close()
orNetStream::dispose()
didn't help.Didn't test with FLV videos.
Didn't test with
Sound
.Related issues:
#1939
#224
#211
#202
#155
#15
Steps to Reproduce
Launch application with code below. It just play video with audio in a loop. Click anywhere on stage to restart video (it will be stopped and new one started).
You need to click in a "correct" moment to hear crackling noticeable and clear. Please take a look at demonstration video below.
Application example with sources and video sample attached.
netstream_stop_crackling_bug.zip
Actual Result:
Audio crackling at video restart (
NetStream::close()
orNetStream::dispose()
call).Video demonstration:
demonstration.mp4
Expected Result:
No audio crackling at video restart (or stop).
Known Workarounds
soundTransform
), wait ~30 frames (viaENTER_FRAME
) and only after callNetStream::dispose()
.The text was updated successfully, but these errors were encountered: