### Question:
DefaultAudioSink implements AudioSink { @Override public boolean supportsOutput(int channelCount, @C.Encoding int encoding) { if (Util.isEncodingLinearPcm(encoding)) { return encoding != C.ENCODING_PCM_FLOAT || Util.SDK_INT >= 21; } else { return audioCapabilities != null && audioCapabilities.supportsEncoding(encoding) && (channelCount == Format.NO_VALUE || channelCount <= audioCapabilities.getMaxChannelCount()); } } DefaultAudioSink(
      @Nullable AudioCapabilities audioCapabilities, AudioProcessor[] audioProcessors);  DefaultAudioSink(
      @Nullable AudioCapabilities audioCapabilities,
      AudioProcessor[] audioProcessors,
      boolean enableConvertHighResIntPcmToFloat);  DefaultAudioSink(
      @Nullable AudioCapabilities audioCapabilities,
      AudioProcessorChain audioProcessorChain,
      boolean enableConvertHighResIntPcmToFloat); @Override void setListener(Listener listener); @Override boolean supportsOutput(int channelCount, @C.Encoding int encoding); @Override long getCurrentPositionUs(boolean sourceEnded); @Override void configure(
      @C.Encoding int inputEncoding,
      int inputChannelCount,
      int inputSampleRate,
      int specifiedBufferSize,
      @Nullable int[] outputChannels,
      int trimStartFrames,
      int trimEndFrames); @Override void play(); @Override void handleDiscontinuity(); @Override @SuppressWarnings("ReferenceEquality") boolean handleBuffer(ByteBuffer buffer, long presentationTimeUs); @Override void playToEndOfStream(); @Override boolean isEnded(); @Override boolean hasPendingData(); @Override void setPlaybackParameters(PlaybackParameters playbackParameters); @Override PlaybackParameters getPlaybackParameters(); @Override void setAudioAttributes(AudioAttributes audioAttributes); @Override void setAudioSessionId(int audioSessionId); @Override void setAuxEffectInfo(AuxEffectInfo auxEffectInfo); @Override void enableTunnelingV21(int tunnelingAudioSessionId); @Override void disableTunneling(); @Override void setVolume(float volume); @Override void pause(); @Override void flush(); @Override void reset(); static boolean enablePreV21AudioSessionWorkaround; static boolean failOnSpuriousAudioTimestamp; }### Answer:
@Config(minSdk = OLDEST_SDK, maxSdk = 20) @Test public void doesNotSupportFloatOutputBeforeApi21() { assertThat(defaultAudioSink.supportsOutput(CHANNEL_COUNT_STEREO, C.ENCODING_PCM_FLOAT)) .isFalse(); }
@Config(minSdk = 21, maxSdk = TARGET_SDK) @Test public void supportsFloatOutputFromApi21() { assertThat(defaultAudioSink.supportsOutput(CHANNEL_COUNT_STEREO, C.ENCODING_PCM_FLOAT)) .isTrue(); }