本文整理汇总了Java中com.google.android.exoplayer.audio.AudioTrack.WriteException方法的典型用法代码示例。如果您正苦于以下问题:Java AudioTrack.WriteException方法的具体用法?Java AudioTrack.WriteException怎么用?Java AudioTrack.WriteException使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.android.exoplayer.audio.AudioTrack
的用法示例。
在下文中一共展示了AudioTrack.WriteException方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: notifyAudioTrackWriteError
import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
private void notifyAudioTrackWriteError(final AudioTrack.WriteException e) {
if (eventHandler != null && eventListener != null) {
eventHandler.post(new Runnable() {
@Override
public void run() {
eventListener.onAudioTrackWriteError(e);
}
});
}
}
示例2: notifyAudioTrackWriteError
import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
private void notifyAudioTrackWriteError(final AudioTrack.WriteException e) {
if (mEventHandler == null || mEventListener == null) {
return;
}
mEventHandler.post(new Runnable() {
@Override
public void run() {
mEventListener.onAudioTrackWriteError(e);
}
});
}
示例3: handleBuffer
import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
public int handleBuffer(ByteBuffer buffer, int offset, int size, long presentationTimeUs)
throws AudioTrack.WriteException {
if (!mIsEnabled) {
return AudioTrack.RESULT_BUFFER_CONSUMED;
}
return mAudioTrack.handleBuffer(buffer, offset, size, presentationTimeUs);
}
示例4: notifyAudioTrackWriteError
import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
private void notifyAudioTrackWriteError(final AudioTrack.WriteException e) {
if (eventHandler != null && eventListener != null) {
eventHandler.post(new Runnable() {
@Override
public void run() {
eventListener.onAudioTrackWriteError(e);
}
});
}
}
示例5: onAudioTrackWriteError
import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
if (internalErrorListener != null) {
internalErrorListener.onAudioTrackWriteError(e);
}
}
示例6: onAudioTrackWriteError
import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
printInternalError("audioTrackWriteError", e);
}
示例7: onAudioTrackWriteError
import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
if (internalErrorListener != null) {
internalErrorListener.onAudioTrackWriteError(e);
}
}
示例8: renderBuffer
import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
private void renderBuffer() throws OpusDecoderException, AudioTrack.InitializationException,
AudioTrack.WriteException {
if (outputStreamEnded) {
return;
}
if (outputBuffer == null) {
outputBuffer = decoder.dequeueOutputBuffer();
if (outputBuffer == null) {
return;
}
}
if (outputBuffer.getFlag(Buffer.FLAG_END_OF_STREAM)) {
outputStreamEnded = true;
audioTrack.handleEndOfStream();
outputBuffer.release();
outputBuffer = null;
return;
}
if (!audioTrack.isInitialized()) {
if (audioSessionId != AudioTrack.SESSION_ID_NOT_SET) {
audioTrack.initialize(audioSessionId);
} else {
audioSessionId = audioTrack.initialize();
}
if (getState() == TrackRenderer.STATE_STARTED) {
audioTrack.play();
}
}
int handleBufferResult;
handleBufferResult = audioTrack.handleBuffer(outputBuffer.data, outputBuffer.data.position(),
outputBuffer.data.remaining(), outputBuffer.timestampUs);
// If we are out of sync, allow currentPositionUs to jump backwards.
if ((handleBufferResult & AudioTrack.RESULT_POSITION_DISCONTINUITY) != 0) {
allowPositionDiscontinuity = true;
}
// Release the buffer if it was consumed.
if ((handleBufferResult & AudioTrack.RESULT_BUFFER_CONSUMED) != 0) {
codecCounters.renderedOutputBufferCount++;
outputBuffer.release();
outputBuffer = null;
}
}
示例9: onAudioTrackWriteError
import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
printInternalError("audioTrackWriteError", e);
}
示例10: onAudioTrackWriteError
import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
/**
* Invoked when an {@link AudioTrack} write fails.
*
* @param e The corresponding exception.
*/
void onAudioTrackWriteError(AudioTrack.WriteException e);
示例11: onAudioTrackWriteError
import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
}
示例12: onAudioTrackWriteError
import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
void onAudioTrackWriteError(AudioTrack.WriteException e);