mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
change to switch to avoid changing 4.0 tracks
This commit is contained in:
parent
e22c42c7c2
commit
cc24c4e38b
1 changed files with 11 additions and 4 deletions
|
|
@ -442,10 +442,17 @@ public final class AudioTrack {
|
||||||
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)) {
|
if (Util.SDK_INT <= 23 && "foster".equals(Util.DEVICE) && "NVIDIA".equals(Util.MANUFACTURER)) {
|
||||||
if (channelCount == 7)
|
switch(channelCount) {
|
||||||
channelConfig = C.CHANNEL_OUT_7POINT1_SURROUND;
|
case 7:
|
||||||
else if (channelCount >=3 && channelCount <= 5)
|
channelConfig = C.CHANNEL_OUT_7POINT1_SURROUND;
|
||||||
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1;
|
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);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue