mirror of
https://github.com/samsonjs/media.git
synced 2026-03-31 10:25:48 +00:00
Set AudioCapabilities.DEFAULT_MAX_CHANNEL_COUNT to 10
This commit is contained in:
parent
d01a93b94e
commit
689451b0c6
1 changed files with 2 additions and 7 deletions
|
|
@ -49,7 +49,7 @@ import java.util.Arrays;
|
|||
@UnstableApi
|
||||
public final class AudioCapabilities {
|
||||
|
||||
private static final int DEFAULT_MAX_CHANNEL_COUNT = 8;
|
||||
private static final int DEFAULT_MAX_CHANNEL_COUNT = 10;
|
||||
@VisibleForTesting /* package */ static final int DEFAULT_SAMPLE_RATE_HZ = 48_000;
|
||||
|
||||
/** The minimum audio capabilities supported by all devices. */
|
||||
|
|
@ -224,12 +224,7 @@ public final class AudioCapabilities {
|
|||
channelCount = getMaxSupportedChannelCountForPassthrough(encoding, sampleRate);
|
||||
} else {
|
||||
channelCount = format.channelCount;
|
||||
if (format.sampleMimeType == MimeTypes.AUDIO_DTS_X) {
|
||||
if (channelCount > 10) {
|
||||
// To fix wrong reporting from device. ChannelCount is reported as 8 for DTS:X P2 on some devices
|
||||
return null;
|
||||
}
|
||||
} else if (channelCount > maxChannelCount) {
|
||||
if (channelCount > maxChannelCount) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue