Commit efc8f6fe by ojw28 Committed by GitHub

Merge pull request #2134 from drhill/dev-v2_passthroughChannelFix

fix 6.1 channel passthrough failing
parents a007d9a2 cc24c4e3
...@@ -443,6 +443,19 @@ public final class AudioTrack { ...@@ -443,6 +443,19 @@ public final class AudioTrack {
default: default:
throw new IllegalArgumentException("Unsupported channel count: " + channelCount); 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); boolean passthrough = !MimeTypes.AUDIO_RAW.equals(mimeType);
@C.Encoding int sourceEncoding; @C.Encoding int sourceEncoding;
......
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