Remove internal renderer audio session ID propagation

Overriding this method will never be necessary or advisable once we
improve routing of audio session IDs

Issue: #8190
PiperOrigin-RevId: 350146302
This commit is contained in:
olly 2021-01-05 16:33:13 +00:00 committed by Ian Baker
parent 6d2d2e31ef
commit 0901fe6e38
2 changed files with 0 additions and 28 deletions

View file

@ -20,7 +20,6 @@ import static com.google.android.exoplayer2.decoder.DecoderReuseEvaluation.DISCA
import static com.google.android.exoplayer2.decoder.DecoderReuseEvaluation.REUSE_RESULT_NO;
import static java.lang.Math.max;
import android.media.audiofx.Virtualizer;
import android.os.Handler;
import android.os.SystemClock;
import androidx.annotation.CallSuper;
@ -313,18 +312,6 @@ public abstract class DecoderAudioRenderer<
}
}
/**
* Called when the audio session id becomes known. The default implementation is a no-op. One
* reason for overriding this method would be to instantiate and enable a {@link Virtualizer} in
* order to spatialize the audio channels. For this use case, any {@link Virtualizer} instances
* should be released in {@link #onDisabled()} (if not before).
*
* <p>See {@link AudioSink.Listener#onAudioSessionId(int)}.
*/
protected void onAudioSessionId(int audioSessionId) {
// Do nothing.
}
/** See {@link AudioSink.Listener#onPositionDiscontinuity()}. */
@CallSuper
protected void onPositionDiscontinuity() {
@ -730,7 +717,6 @@ public abstract class DecoderAudioRenderer<
@Override
public void onAudioSessionId(int audioSessionId) {
eventDispatcher.audioSessionId(audioSessionId);
DecoderAudioRenderer.this.onAudioSessionId(audioSessionId);
}
@Override

View file

@ -26,7 +26,6 @@ import android.media.AudioFormat;
import android.media.MediaCodec;
import android.media.MediaCrypto;
import android.media.MediaFormat;
import android.media.audiofx.Virtualizer;
import android.os.Handler;
import androidx.annotation.CallSuper;
import androidx.annotation.Nullable;
@ -475,18 +474,6 @@ public class MediaCodecAudioRenderer extends MediaCodecRenderer implements Media
}
}
/**
* Called when the audio session id becomes known. The default implementation is a no-op. One
* reason for overriding this method would be to instantiate and enable a {@link Virtualizer} in
* order to spatialize the audio channels. For this use case, any {@link Virtualizer} instances
* should be released in {@link #onDisabled()} (if not before).
*
* <p>See {@link AudioSink.Listener#onAudioSessionId(int)}.
*/
protected void onAudioSessionId(int audioSessionId) {
// Do nothing.
}
/** See {@link AudioSink.Listener#onPositionDiscontinuity()}. */
@CallSuper
protected void onPositionDiscontinuity() {
@ -829,7 +816,6 @@ public class MediaCodecAudioRenderer extends MediaCodecRenderer implements Media
@Override
public void onAudioSessionId(int audioSessionId) {
eventDispatcher.audioSessionId(audioSessionId);
MediaCodecAudioRenderer.this.onAudioSessionId(audioSessionId);
}
@Override