The framework opus decoder discards some samples after a call to flush(). Because we flush a decoder that is being retained across an input format change, this means that the start of audio gets truncated when transitioning to a new opus stream. See also https://android.googlesource.com/platform/frameworks/av/+/refs/heads/android10-release/media/libstagefright/codecs/opus/dec/SoftOpus.cpp. Avoid this by recreating opus decoders instead of flushing them. It seems fine to do this for all opus decoders as reinitialization should be cheap, OEM-provided implementations may also discard samples and playback shouldn't be interrupted on reinitialization due to the downstream AudioTrack buffer. PiperOrigin-RevId: 277458759
| Name |
Last commit
|
Last Update |
|---|---|---|
| .github/ISSUE_TEMPLATE | Loading commit data... | |
| .idea | Loading commit data... | |
| demos | Loading commit data... | |
| extensions | Loading commit data... | |
| gradle/wrapper | Loading commit data... | |
| issues | Loading commit data... | |
| library | Loading commit data... | |
| playbacktests | Loading commit data... | |
| testutils | Loading commit data... | |
| testutils_robolectric | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .hgignore | Loading commit data... | |
| CONTRIBUTING.md | Loading commit data... | |
| LICENSE | Loading commit data... | |
| README.md | Loading commit data... | |
| RELEASENOTES.md | Loading commit data... | |
| build.gradle | Loading commit data... | |
| constants.gradle | Loading commit data... | |
| core_settings.gradle | Loading commit data... | |
| gradle.properties | Loading commit data... | |
| gradlew | Loading commit data... | |
| gradlew.bat | Loading commit data... | |
| javadoc_combined.gradle | Loading commit data... | |
| javadoc_library.gradle | Loading commit data... | |
| javadoc_util.gradle | Loading commit data... | |
| publish.gradle | Loading commit data... | |
| settings.gradle | Loading commit data... |