mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Merge pull request #2134 from drhill/dev-v2_passthroughChannelFix
fix 6.1 channel passthrough failing
This commit is contained in:
commit
efc8f6fe42
1 changed files with 13 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue