Skip to content

Commit

Permalink
Remove bit-perfect configuration API
Browse files Browse the repository at this point in the history
This is not supported.
  • Loading branch information
stoyicker committed Aug 21, 2024
1 parent cb07c92 commit b600d6c
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import com.tidal.sdk.player.commonandroid.TrueTimeWrapper
import com.tidal.sdk.player.playbackengine.model.AssetTimeoutConfig
import com.tidal.sdk.player.playbackengine.model.BufferConfiguration
import com.tidal.sdk.player.playbackengine.player.CacheProvider
import com.tidal.sdk.player.playbackengine.player.renderer.audio.AudioDecodingMode
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.MutableSharedFlow
Expand All @@ -24,7 +23,6 @@ internal class ExoPlayerPlaybackEngineLooperTest {
private val singleHandlerPlaybackEngine = PlaybackEngineModuleRoot(
InstrumentationRegistry.getInstrumentation().targetContext,
mock(),
AudioDecodingMode.NATIVE,
true,
MutableSharedFlow(),
BufferConfiguration(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import com.tidal.sdk.player.playbackengine.model.Event
import com.tidal.sdk.player.playbackengine.offline.cache.OfflineCacheProvider
import com.tidal.sdk.player.playbackengine.playbackprivilege.PlaybackPrivilegeProvider
import com.tidal.sdk.player.playbackengine.player.CacheProvider
import com.tidal.sdk.player.playbackengine.player.renderer.audio.AudioDecodingMode
import com.tidal.sdk.player.streamingapi.StreamingApi
import com.tidal.sdk.player.streamingprivileges.StreamingPrivileges
import java.io.File
Expand All @@ -28,7 +27,6 @@ import okhttp3.OkHttpClient
class PlaybackEngineModuleRoot(
context: Context,
connectivityManager: ConnectivityManager,
audioDecodingMode: AudioDecodingMode,
useLibflacAudioRenderer: Boolean,
events: MutableSharedFlow<Event>,
bufferConfiguration: BufferConfiguration,
Expand Down Expand Up @@ -60,7 +58,6 @@ class PlaybackEngineModuleRoot(
assetTimeoutConfig,
cacheProvider,
configuration,
audioDecodingMode,
useLibflacAudioRenderer,
appSpecificCacheDir,
streamingApi,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import com.tidal.sdk.player.playbackengine.model.Event
import com.tidal.sdk.player.playbackengine.offline.cache.OfflineCacheProvider
import com.tidal.sdk.player.playbackengine.playbackprivilege.PlaybackPrivilegeProvider
import com.tidal.sdk.player.playbackengine.player.CacheProvider
import com.tidal.sdk.player.playbackengine.player.renderer.audio.AudioDecodingMode
import com.tidal.sdk.player.streamingapi.StreamingApi
import com.tidal.sdk.player.streamingprivileges.StreamingPrivileges
import dagger.BindsInstance
Expand Down Expand Up @@ -46,7 +45,6 @@ interface ExoPlayerPlaybackEngineComponent {
@BindsInstance assetTimeoutConfig: AssetTimeoutConfig,
@BindsInstance cacheProvider: CacheProvider,
@BindsInstance configuration: Configuration,
@BindsInstance audioDecodingMode: AudioDecodingMode,
@BindsInstance @Named("useLibflacAudioRenderer") useLibflacAudioRenderer: Boolean,
@BindsInstance appSpecificCacheDir: File,
@BindsInstance streamingApi: StreamingApi,
Expand Down

This file was deleted.

10 changes: 0 additions & 10 deletions player/src/main/kotlin/com/tidal/sdk/player/Player.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.tidal.sdk.player

import android.app.Application
import android.os.Build
import com.tidal.sdk.auth.CredentialsProvider
import com.tidal.sdk.eventproducer.EventSender
import com.tidal.sdk.player.common.Configuration
Expand All @@ -14,7 +13,6 @@ import com.tidal.sdk.player.playbackengine.model.BufferConfiguration
import com.tidal.sdk.player.playbackengine.playbackprivilege.PlaybackPrivilege
import com.tidal.sdk.player.playbackengine.playbackprivilege.PlaybackPrivilegeProvider
import com.tidal.sdk.player.playbackengine.player.CacheProvider
import com.tidal.sdk.player.playbackengine.player.renderer.audio.AudioDecodingMode
import com.tidal.sdk.player.streamingapi.StreamingApiTimeoutConfig
import okhttp3.OkHttpClient

Expand All @@ -24,8 +22,6 @@ import okhttp3.OkHttpClient
* @param application An [Application] to use.
* @param[credentialsProvider] A [CredentialsProvider] from the Auth SDK.
* @param[eventSender] An [EventSender] from the EventProducer SDK.
* @param audioDecodingMode The decoding mode to use for audio. See [AudioDecodingMode] for more
* info.
* @param userClientIdSupplier A function that supplies a userClientId used for event tracking.
* This value needs to be taken from the session. Internal use only.
* @param bufferConfiguration The parameters to configure different values for player buffer
Expand All @@ -49,11 +45,6 @@ class Player(
application: Application,
credentialsProvider: CredentialsProvider,
eventSender: EventSender,
audioDecodingMode: AudioDecodingMode = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
AudioDecodingMode.BIT_PERFECT
} else {
AudioDecodingMode.NATIVE
},
useLibflacAudioRenderer: Boolean = true,
userClientIdSupplier: (() -> Int)? = null,
bufferConfiguration: BufferConfiguration = BufferConfiguration(),
Expand All @@ -74,7 +65,6 @@ class Player(
application,
credentialsProvider,
eventSender,
audioDecodingMode,
useLibflacAudioRenderer,
userClientIdSupplier,
version,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import com.tidal.sdk.player.playbackengine.model.BufferConfiguration
import com.tidal.sdk.player.playbackengine.model.Event
import com.tidal.sdk.player.playbackengine.playbackprivilege.PlaybackPrivilegeProvider
import com.tidal.sdk.player.playbackengine.player.CacheProvider
import com.tidal.sdk.player.playbackengine.player.renderer.audio.AudioDecodingMode
import com.tidal.sdk.player.streamingapi.StreamingApi
import com.tidal.sdk.player.streamingprivileges.StreamingPrivileges
import dagger.Module
Expand Down Expand Up @@ -44,7 +43,6 @@ internal object PlaybackEngineModule {
fun playbackEngine(
context: Context,
connectivityManager: ConnectivityManager,
audioDecodingMode: AudioDecodingMode,
@Named("useLibflacAudioRenderer") useLibflacAudioRenderer: Boolean,
events: MutableSharedFlow<Event>,
bufferConfiguration: BufferConfiguration,
Expand All @@ -69,7 +67,6 @@ internal object PlaybackEngineModule {
) = PlaybackEngineModuleRoot(
context,
connectivityManager,
audioDecodingMode,
useLibflacAudioRenderer,
events,
bufferConfiguration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import com.tidal.sdk.player.playbackengine.model.AssetTimeoutConfig
import com.tidal.sdk.player.playbackengine.model.BufferConfiguration
import com.tidal.sdk.player.playbackengine.playbackprivilege.PlaybackPrivilegeProvider
import com.tidal.sdk.player.playbackengine.player.CacheProvider
import com.tidal.sdk.player.playbackengine.player.renderer.audio.AudioDecodingMode
import com.tidal.sdk.player.streamingapi.StreamingApiTimeoutConfig
import com.tidal.sdk.player.streamingprivileges.StreamingPrivileges
import dagger.BindsInstance
Expand Down Expand Up @@ -44,7 +43,6 @@ internal interface PlayerComponent {
@BindsInstance context: Context,
@BindsInstance credentialsProvider: CredentialsProvider,
@BindsInstance eventSender: EventSender,
@BindsInstance audioDecodingMode: AudioDecodingMode,
@BindsInstance @Named("useLibflacAudioRenderer") useLibflacAudioRenderer: Boolean,
@BindsInstance userClientIdSupplier: (() -> Int)?,
@BindsInstance version: String,
Expand Down

0 comments on commit b600d6c

Please sign in to comment.