mirror of
https://github.com/samsonjs/media.git
synced 2026-04-11 12:15:47 +00:00
Refactor AudioCapabilities.getCapabilities
This commit is contained in:
parent
5a6906a2b6
commit
d0cd2f5f21
1 changed files with 3 additions and 2 deletions
|
|
@ -123,11 +123,12 @@ public final class AudioCapabilities {
|
|||
AudioManager.EXTRA_MAX_CHANNEL_COUNT, /* defaultValue= */ DEFAULT_MAX_CHANNEL_COUNT));
|
||||
}
|
||||
|
||||
if (supportedEncodings.build().isEmpty()) {
|
||||
ImmutableSet supportedEncodingsSet = supportedEncodings.build();
|
||||
if (supportedEncodingsSet.isEmpty()) {
|
||||
return DEFAULT_AUDIO_CAPABILITIES;
|
||||
} else {
|
||||
return new AudioCapabilities(
|
||||
Ints.toArray(supportedEncodings.build()), /* defaultValue= */ DEFAULT_MAX_CHANNEL_COUNT);
|
||||
Ints.toArray(supportedEncodingsSet), /* defaultValue= */ DEFAULT_MAX_CHANNEL_COUNT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue