当前位置: 首页>>代码示例>>Java>>正文


Java AudioTrack.WriteException方法代码示例

本文整理汇总了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);
      }
    });
  }
}
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:11,代码来源:MediaCodecAudioTrackRenderer.java

示例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);
        }
    });
}
 
开发者ID:trevd,项目名称:android_packages_apps_tv,代码行数:12,代码来源:Ac3PassthroughTrackRenderer.java

示例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);
}
 
开发者ID:trevd,项目名称:android_packages_apps_tv,代码行数:8,代码来源:AudioTrackWrapper.java

示例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);
      }
    });
  }
}
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:11,代码来源:LibopusAudioTrackRenderer.java

示例5: onAudioTrackWriteError

import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
    if (internalErrorListener != null) {
        internalErrorListener.onAudioTrackWriteError(e);
    }
}
 
开发者ID:nejtv,项目名称:androidtv-sample,代码行数:7,代码来源:DemoPlayer.java

示例6: onAudioTrackWriteError

import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
  printInternalError("audioTrackWriteError", e);
}
 
开发者ID:Dreamxiaoxuan,项目名称:AndroidTvDemo,代码行数:5,代码来源:EventLogger.java

示例7: onAudioTrackWriteError

import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
  if (internalErrorListener != null) {
    internalErrorListener.onAudioTrackWriteError(e);
  }
}
 
开发者ID:Dreamxiaoxuan,项目名称:AndroidTvDemo,代码行数:7,代码来源:DemoPlayer.java

示例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;
  }
}
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:49,代码来源:LibopusAudioTrackRenderer.java

示例9: onAudioTrackWriteError

import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {
    printInternalError("audioTrackWriteError", e);
}
 
开发者ID:nextux,项目名称:sbs-android-tv,代码行数:5,代码来源:EventLogger.java

示例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);
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:7,代码来源:LibopusAudioTrackRenderer.java

示例11: onAudioTrackWriteError

import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
@Override
public void onAudioTrackWriteError(AudioTrack.WriteException e) {

}
 
开发者ID:quanhua92,项目名称:GLMediaPlayer,代码行数:5,代码来源:CustomExoPlayer.java

示例12: onAudioTrackWriteError

import com.google.android.exoplayer.audio.AudioTrack; //导入方法依赖的package包/类
void onAudioTrackWriteError(AudioTrack.WriteException e); 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:2,代码来源:DemoPlayer.java


注:本文中的com.google.android.exoplayer.audio.AudioTrack.WriteException方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。