Commit cc24c4e3 by drhill Committed by GitHub

change to switch to avoid changing 4.0 tracks

parent e22c42c7
......@@ -442,10 +442,17 @@ public final class AudioTrack {
throw new IllegalArgumentException("Unsupported channel count: " + channelCount);
}
if (Util.SDK_INT <= 23 && "foster".equals(Util.DEVICE) && "NVIDIA".equals(Util.MANUFACTURER)) {
if (channelCount == 7)
channelConfig = C.CHANNEL_OUT_7POINT1_SURROUND;
else if (channelCount >=3 && channelCount <= 5)
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1;
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment