Revert "Update media3 to 1.2.0-alpha02"

This reverts commit 7a9c5a1612.
This commit is contained in:
Naveen 2023-10-17 09:03:06 +05:30
parent 916b7efb90
commit d541b055a1
No known key found for this signature in database
GPG key ID: 0E155DAD31671DA3
2 changed files with 9 additions and 2 deletions

View file

@ -22,7 +22,7 @@ private const val SKIP_SILENCE_THRESHOLD_LEVEL = 16.toShort()
@UnstableApi
class AudioOnlyRenderersFactory(context: Context) : DefaultRenderersFactory(context) {
override fun buildAudioSink(context: Context, enableFloatOutput: Boolean, enableAudioTrackPlaybackParams: Boolean): AudioSink {
override fun buildAudioSink(context: Context, enableFloatOutput: Boolean, enableAudioTrackPlaybackParams: Boolean, enableOffload: Boolean): AudioSink? {
val silenceSkippingAudioProcessor = SilenceSkippingAudioProcessor(
SKIP_SILENCE_MINIMUM_DURATION_US,
DEFAULT_PADDING_SILENCE_US,
@ -32,6 +32,13 @@ class AudioOnlyRenderersFactory(context: Context) : DefaultRenderersFactory(cont
return DefaultAudioSink.Builder(context)
.setEnableFloatOutput(enableFloatOutput)
.setEnableAudioTrackPlaybackParams(enableAudioTrackPlaybackParams)
.setOffloadMode(
if (enableOffload) {
DefaultAudioSink.OFFLOAD_MODE_ENABLED_GAPLESS_REQUIRED
} else {
DefaultAudioSink.OFFLOAD_MODE_DISABLED
}
)
.setAudioProcessorChain(
DefaultAudioSink.DefaultAudioProcessorChain(
arrayOf(),

View file

@ -18,7 +18,7 @@ eventbus = "3.3.1"
lottie = "6.1.0"
m3uParser = "1.3.0"
media = "1.6.0"
media3 = "1.2.0-alpha02"
media3 = "1.1.1"
room = "2.5.2"
#Simple Mobile Tools
simple-commons = "6a7777d740"