[英]Play WAV audio files in Android's Exoplayer
我實現了Exoplayer,並使用以下代碼播放歌曲:
Allocator allocator = new DefaultAllocator(BUFFER_SEGMENT_SIZE);
DataSource dataSource = new DefaultUriDataSource(mService, null, "useragent");
ExtractorSampleSource sampleSource = new ExtractorSampleSource(Uri.parse(url), dataSource, allocator, BUFFER_SEGMENT_COUNT * BUFFER_SEGMENT_SIZE);
MediaCodecAudioTrackRenderer audioRenderer = new MediaCodecAudioTrackRenderer(sampleSource, MediaCodecSelector.DEFAULT);
mExoPlayer.prepare(audioRenderer);
我不僅要播放MP3音頻文件,還希望播放WAV文件。 我讀到應該創建自定義提取器,但實際上找不到任何文檔。
有人知道如何在Exoplayer中播放WAV音頻文件嗎?
看看這個: https : //github.com/google/ExoPlayer/issues/1246
可能在將來的版本中實現
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.