Merge pull request #2134 from drhill/dev-v2_passthroughChannelFix

fix 6.1 channel passthrough failing
This commit is contained in:
ojw28 2016-12-20 12:26:20 +00:00 committed by GitHub
commit efc8f6fe42

View File

@ -443,6 +443,19 @@ public final class AudioTrack {
default:
throw new IllegalArgumentException("Unsupported channel count: " + channelCount);
}
if (Util.SDK_INT <= 23 && "foster".equals(Util.DEVICE) && "NVIDIA".equals(Util.MANUFACTURER)) {
switch(channelCount) {
case 7:
channelConfig = C.CHANNEL_OUT_7POINT1_SURROUND;
break;
case 3:
case 5:
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1;
break;
default:
break;
}
}
boolean passthrough = !MimeTypes.AUDIO_RAW.equals(mimeType);
@C.Encoding int sourceEncoding;