mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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
|
@UnstableApi
|
||||||
public final class AudioCapabilities {
|
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;
|
@VisibleForTesting /* package */ static final int DEFAULT_SAMPLE_RATE_HZ = 48_000;
|
||||||
|
|
||||||
/** The minimum audio capabilities supported by all devices. */
|
/** The minimum audio capabilities supported by all devices. */
|
||||||
|
|
@ -224,12 +224,7 @@ public final class AudioCapabilities {
|
||||||
channelCount = getMaxSupportedChannelCountForPassthrough(encoding, sampleRate);
|
channelCount = getMaxSupportedChannelCountForPassthrough(encoding, sampleRate);
|
||||||
} else {
|
} else {
|
||||||
channelCount = format.channelCount;
|
channelCount = format.channelCount;
|
||||||
if (format.sampleMimeType == MimeTypes.AUDIO_DTS_X) {
|
if (channelCount > maxChannelCount) {
|
||||||
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) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue