mirror of
https://github.com/samsonjs/media.git
synced 2026-06-28 05:29:33 +00:00
Format with google-java-format
This commit is contained in:
parent
0f200ba5d1
commit
215f663019
2 changed files with 11 additions and 10 deletions
|
|
@ -62,9 +62,10 @@ public class DefaultAudioTrackBufferSizeProvider
|
|||
* devices (e.g., Broadcom 7271).
|
||||
*/
|
||||
private static final int AC3_BUFFER_MULTIPLICATION_FACTOR = 2;
|
||||
|
||||
/**
|
||||
* Default multiplication factor to apply to DTS Express passthrough buffer to avoid underruns
|
||||
* on some devices (e.g., Xiaomi A2 TV).
|
||||
* Default multiplication factor to apply to DTS Express passthrough buffer to avoid underruns on
|
||||
* some devices (e.g., Xiaomi A2 TV).
|
||||
*/
|
||||
private static final int DTSHD_BUFFER_MULTIPLICATION_FACTOR = 4;
|
||||
|
||||
|
|
@ -152,9 +153,9 @@ public class DefaultAudioTrackBufferSizeProvider
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the multiplication factor to apply to the passthrough buffer for DTS-HD (DTS Express)
|
||||
* to avoid underruns on some devices (e.g., Xiaomi A2 TV). Default is
|
||||
* {@link #DTSHD_BUFFER_MULTIPLICATION_FACTOR}.
|
||||
* Sets the multiplication factor to apply to the passthrough buffer for DTS-HD (DTS Express) to
|
||||
* avoid underruns on some devices (e.g., Xiaomi A2 TV). Default is {@link
|
||||
* #DTSHD_BUFFER_MULTIPLICATION_FACTOR}.
|
||||
*/
|
||||
@CanIgnoreReturnValue
|
||||
public Builder setDtshdBufferMultiplicationFactor(int dtshdBufferMultiplicationFactor) {
|
||||
|
|
@ -188,11 +189,13 @@ public class DefaultAudioTrackBufferSizeProvider
|
|||
* (e.g., Broadcom 7271).
|
||||
*/
|
||||
public final int ac3BufferMultiplicationFactor;
|
||||
|
||||
/**
|
||||
* The multiplication factor to apply to DTS-HD (DTS Express) passthrough buffer to avoid
|
||||
* underruns on some devices (e.g., Xiaomi A2 TV).
|
||||
*/
|
||||
public final int dtshdBufferMultiplicationFactor;
|
||||
|
||||
protected DefaultAudioTrackBufferSizeProvider(Builder builder) {
|
||||
minPcmBufferDurationUs = builder.minPcmBufferDurationUs;
|
||||
maxPcmBufferDurationUs = builder.maxPcmBufferDurationUs;
|
||||
|
|
|
|||
|
|
@ -26,9 +26,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
|
|||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
/**
|
||||
* Tests for {@link DefaultAudioTrackBufferSizeProvider} DTS-HD (DTS Express) audio.
|
||||
*/
|
||||
/** Tests for {@link DefaultAudioTrackBufferSizeProvider} DTS-HD (DTS Express) audio. */
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class DefaultAudioTrackBufferSizeProviderDTSHDTest {
|
||||
|
||||
|
|
@ -37,7 +35,7 @@ public class DefaultAudioTrackBufferSizeProviderDTSHDTest {
|
|||
|
||||
@Test
|
||||
public void
|
||||
getBufferSizeInBytes_passthroughDtshdAndNoBitrate_assumesMaxByteRateTimesMultiplicationFactor() {
|
||||
getBufferSizeInBytes_passthroughDtshdAndNoBitrate_assumesMaxByteRateTimesMultiplicationFactor() {
|
||||
int bufferSize =
|
||||
DEFAULT.getBufferSizeInBytes(
|
||||
/* minBufferSizeInBytes= */ 0,
|
||||
|
|
@ -56,7 +54,7 @@ public class DefaultAudioTrackBufferSizeProviderDTSHDTest {
|
|||
|
||||
@Test
|
||||
public void
|
||||
getBufferSizeInBytes_passthroughDtshdAt384Kbits_isPassthroughBufferSizeTimesMultiplicationFactor() {
|
||||
getBufferSizeInBytes_passthroughDtshdAt384Kbits_isPassthroughBufferSizeTimesMultiplicationFactor() {
|
||||
int bufferSize =
|
||||
DEFAULT.getBufferSizeInBytes(
|
||||
/* minBufferSizeInBytes= */ 0,
|
||||
|
|
|
|||
Loading…
Reference in a new issue