com.google.android.exoplayer.audio.AudioTrack Java Examples

The following examples show how to use com.google.android.exoplayer.audio.AudioTrack. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EventProxy.java    From exoplayer-textureview with Apache License 2.0 5 votes vote down vote up
/** MediaCodecAudioTrackRenderer.EventListener */
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
    if (internalErrorListener != null) {
        internalErrorListener.onAudioTrackWriteError(e);
    }
}
 
Example #2
Source File: EventProxy.java    From exoplayer-textureview with Apache License 2.0 5 votes vote down vote up
/** MediaCodecAudioTrackRenderer.EventListener */
@Override
public void onAudioTrackInitializationError(AudioTrack.InitializationException e) {
    if (internalErrorListener != null) {
        internalErrorListener.onAudioTrackInitializationError(e);
    }
}
 
Example #3
Source File: MediaCodecAudioTrackRenderer.java    From Exoplayer_VLC with Apache License 2.0 5 votes vote down vote up
private void notifyAudioTrackWriteError(final AudioTrack.WriteException e) {
  if (eventHandler != null && eventListener != null) {
    eventHandler.post(new Runnable()  {
      @Override
      public void run() {
        eventListener.onAudioTrackWriteError(e);
      }
    });
  }
}
 
Example #4
Source File: MediaCodecAudioTrackRenderer.java    From Exoplayer_VLC with Apache License 2.0 5 votes vote down vote up
private void notifyAudioTrackInitializationError(final AudioTrack.InitializationException e) {
  if (eventHandler != null && eventListener != null) {
    eventHandler.post(new Runnable()  {
      @Override
      public void run() {
        eventListener.onAudioTrackInitializationError(e);
      }
    });
  }
}
 
Example #5
Source File: MediaCodecAudioTrackRenderer.java    From Exoplayer_VLC with Apache License 2.0 5 votes vote down vote up
@Override
protected void onDisabled() {
  audioSessionId = AudioTrack.SESSION_ID_NOT_SET;
  try {
    audioTrack.reset();
  } finally {
    super.onDisabled();
  }
}
 
Example #6
Source File: MediaCodecAudioTrackRenderer.java    From Exoplayer_VLC with Apache License 2.0 5 votes vote down vote up
@Override
protected long getCurrentPositionUs() {
  long audioTrackCurrentPositionUs = audioTrack.getCurrentPositionUs(isEnded());
  if (audioTrackCurrentPositionUs == AudioTrack.CURRENT_POSITION_NOT_SET) {
    // Use the super class position before audio playback starts.
    currentPositionUs = Math.max(currentPositionUs, super.getCurrentPositionUs());
  } else {
    // Make sure we don't ever report time moving backwards.
    currentPositionUs = Math.max(currentPositionUs, audioTrackCurrentPositionUs);
  }
  return currentPositionUs;
}
 
Example #7
Source File: EventLogger.java    From iview-android-tv with MIT License 4 votes vote down vote up
@Override
public void onAudioTrackInitializationError(AudioTrack.InitializationException e) {
    printInternalError("audioTrackInitializationError", e);
}
 
Example #8
Source File: VideoPlayer.java    From iview-android-tv with MIT License 4 votes vote down vote up
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
    if (internalErrorListener != null) {
        internalErrorListener.onAudioTrackWriteError(e);
    }
}
 
Example #9
Source File: DemoPlayer.java    From Android-Example-HLS-ExoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onAudioTrackWriteError(e);
  }
}
 
Example #10
Source File: DemoPlayer.java    From Android-Example-HLS-ExoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackInitializationError(AudioTrack.InitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onAudioTrackInitializationError(e);
  }
}
 
Example #11
Source File: EventLogger.java    From Android-Example-HLS-ExoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
  printInternalError("audioTrackWriteError", e);
}
 
Example #12
Source File: EventLogger.java    From Android-Example-HLS-ExoPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackInitializationError(AudioTrack.InitializationException e) {
  printInternalError("audioTrackInitializationError", e);
}
 
Example #13
Source File: DemoPlayer.java    From talk-android with MIT License 4 votes vote down vote up
@Override
public void onAudioTrackInitializationError(AudioTrack.InitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onAudioTrackInitializationError(e);
  }
}
 
Example #14
Source File: DemoPlayer.java    From ShareBox with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackInitializationError(AudioTrack.InitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onAudioTrackInitializationError(e);
  }
}
 
Example #15
Source File: DemoPlayer.java    From ShareBox with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onAudioTrackWriteError(e);
  }
}
 
Example #16
Source File: EventLogger.java    From ShareBox with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
  printInternalError("audioTrackWriteError", e);
}
 
Example #17
Source File: DemoPlayer.java    From talk-android with MIT License 4 votes vote down vote up
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onAudioTrackWriteError(e);
  }
}
 
Example #18
Source File: EventLogger.java    From iview-android-tv with MIT License 4 votes vote down vote up
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
    printInternalError("audioTrackWriteError", e);
}
 
Example #19
Source File: VideoPlayer.java    From iview-android-tv with MIT License 4 votes vote down vote up
@Override
public void onAudioTrackInitializationError(AudioTrack.InitializationException e) {
    if (internalErrorListener != null) {
        internalErrorListener.onAudioTrackInitializationError(e);
    }
}
 
Example #20
Source File: EventLogger.java    From AndroidTvDemo with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
  printInternalError("audioTrackWriteError", e);
}
 
Example #21
Source File: EventLogger.java    From Exoplayer_VLC with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackInitializationError(AudioTrack.InitializationException e) {
  printInternalError("audioTrackInitializationError", e);
}
 
Example #22
Source File: EventLogger.java    From Exoplayer_VLC with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
  printInternalError("audioTrackWriteError", e);
}
 
Example #23
Source File: DemoPlayer.java    From Exoplayer_VLC with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackInitializationError(AudioTrack.InitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onAudioTrackInitializationError(e);
  }
}
 
Example #24
Source File: DemoPlayer.java    From Exoplayer_VLC with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onAudioTrackWriteError(e);
  }
}
 
Example #25
Source File: DemoPlayer.java    From droidkaigi2016 with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackInitializationError(AudioTrack.InitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onAudioTrackInitializationError(e);
  }
}
 
Example #26
Source File: DemoPlayer.java    From droidkaigi2016 with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onAudioTrackWriteError(e);
  }
}
 
Example #27
Source File: DemoPlayer.java    From androidtv-sample-inputs with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackInitializationError(AudioTrack.InitializationException e) {
    if (internalErrorListener != null) {
        internalErrorListener.onAudioTrackInitializationError(e);
    }
}
 
Example #28
Source File: DemoPlayer.java    From androidtv-sample-inputs with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
    if (internalErrorListener != null) {
        internalErrorListener.onAudioTrackWriteError(e);
    }
}
 
Example #29
Source File: ExoplayerWrapper.java    From google-media-framework-android with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackInitializationError(AudioTrack.InitializationException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onAudioTrackInitializationError(e);
  }
}
 
Example #30
Source File: ExoplayerWrapper.java    From google-media-framework-android with Apache License 2.0 4 votes vote down vote up
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onAudioTrackWriteError(e);
  }
}