Skip to content

Commit

Permalink
Merge pull request #107 from lverniu777/master
Browse files Browse the repository at this point in the history
AudioPlayer outputIndex可以取到0
  • Loading branch information
hexleo authored Jul 5, 2021
2 parents 4300335 + 1a4b378 commit 7a9a972
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class AudioPlayer(val player: AnimPlayer) {
if (outputIndex == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) {
decodeOutputBuffers = decoder.outputBuffers
}
if (outputIndex > 0) {
if (outputIndex >= 0) {
val outputBuffer = decodeOutputBuffers[outputIndex]
val chunkPCM = ByteArray(bufferInfo.size)
outputBuffer.get(chunkPCM)
Expand Down

0 comments on commit 7a9a972

Please sign in to comment.