mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
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
This commit is contained in:
parent
641f04774f
commit
fcc994b825
2 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||||
* <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;
|
||||||
Loading…
Reference in a new issue