Commit fcc994b8 by samrobinson Committed by christosts

Rename `FloatResamplingAudioProcessor` to `ToFloatPcmAudioProcessor`.

Resampling as a term is overloaded, however it was raised as a
confusing term in a meeting recently, as the 1P team initially thought
this would change the sample rate. The naming of this `AudioProcessor`
now matches `ToInt16PcmAudioProcessor`.

PiperOrigin-RevId: 503441019
parent 641f0477
...@@ -532,7 +532,7 @@ public final class DefaultAudioSink implements AudioSink { ...@@ -532,7 +532,7 @@ public final class DefaultAudioSink implements AudioSink {
toIntPcmAvailableAudioProcessors = toIntPcmAvailableAudioProcessors =
ImmutableList.of( ImmutableList.of(
new ToInt16PcmAudioProcessor(), channelMappingAudioProcessor, trimmingAudioProcessor); new ToInt16PcmAudioProcessor(), channelMappingAudioProcessor, trimmingAudioProcessor);
toFloatPcmAvailableAudioProcessors = ImmutableList.of(new FloatResamplingAudioProcessor()); toFloatPcmAvailableAudioProcessors = ImmutableList.of(new ToFloatPcmAudioProcessor());
volume = 1f; volume = 1f;
audioAttributes = AudioAttributes.DEFAULT; audioAttributes = AudioAttributes.DEFAULT;
audioSessionId = C.AUDIO_SESSION_ID_UNSET; audioSessionId = C.AUDIO_SESSION_ID_UNSET;
......
...@@ -31,7 +31,7 @@ import java.nio.ByteBuffer; ...@@ -31,7 +31,7 @@ import java.nio.ByteBuffer;
* <li>{@link C#ENCODING_PCM_FLOAT} ({@link #isActive()} will return {@code false}) * <li>{@link C#ENCODING_PCM_FLOAT} ({@link #isActive()} will return {@code false})
* </ul> * </ul>
*/ */
/* package */ final class FloatResamplingAudioProcessor extends BaseAudioProcessor { /* package */ final class ToFloatPcmAudioProcessor extends BaseAudioProcessor {
private static final int FLOAT_NAN_AS_INT = Float.floatToIntBits(Float.NaN); private static final int FLOAT_NAN_AS_INT = Float.floatToIntBits(Float.NaN);
private static final double PCM_32_BIT_INT_TO_PCM_32_BIT_FLOAT_FACTOR = 1.0 / 0x7FFFFFFF; private static final double PCM_32_BIT_INT_TO_PCM_32_BIT_FLOAT_FACTOR = 1.0 / 0x7FFFFFFF;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment