media/libraries
tonihei 5e3dcea1bf Ramp up volume after AudioTrack flush to avoid pop sound
AudioTrack doesn't automatically ramp up the volume after a flush
(only when resuming with play after a pause), which causes audible
pop sounds in most cases. The issue can be avoided by manually
applying a short 20ms volume ramp, the same duration used by the
platform for the automatic volume ramping where available.

Together with the already submitted 6147050b90, this fixes the
unwanted pop sounds for most cases in the desired way. It only
leaves two cases that are not handled perfectly:
 - If the media file itself contains a volume ramp at the beginning,
   we wouldn't need this additional ramping. Given the extremely
   short duration, this seems ignorable and we can treat it as a
   future feature request to mark the beginning of media in a special
   way that can then disable the volume ramping.
 - For seamless period transitions where we keep using the same
   AudioTrack, we may still get a pop sound at the transition. To
   solve this, we'd need a dedicated audio processor to either ramp
   the end of media down and the beginning of the next item up, or
   apply a very short cross-fade. Either way, we need new signalling
   to identify cases where the media originates from the same source
   and this effect should not be applied (e.g. when re-concatenating
   clipped audio snippets from the same file).

PiperOrigin-RevId: 676860234
2024-09-20 08:55:29 -07:00
..
cast Remove @DoNotInline annotations 2024-09-18 04:47:39 -07:00
common Remove @DoNotInline annotations 2024-09-18 04:47:39 -07:00
common_ktx Add jvmTarget and kotlin-android plugin to common_ktx module 2024-08-15 10:36:10 -07:00
container Rename Atom to Mp4Box, and move it to container module 2024-08-15 05:44:32 -07:00
database Do not trim audio samples by changing their timestamp 2023-06-29 22:50:04 +00:00
datasource Assert baseDataSourceFactory non-null in DefaultDataSource.Factory 2024-09-18 02:00:03 -07:00
datasource_cronet Run CronetDataSource contract test for all Cronet providers 2024-08-01 10:49:37 -07:00
datasource_okhttp Automated Code Change 2024-08-07 12:28:25 -07:00
datasource_rtmp Remove exoplayer2-only javadoc machinery from media3 2023-06-05 09:47:58 +00:00
decoder MediaCodecVideoRenderer skips decoder inputs unused as reference 2024-07-09 03:43:06 -07:00
decoder_av1 Fix erroneous use of "cpu_features" in AV1 JNI exports. 2024-09-12 07:30:47 -07:00
decoder_ffmpeg Replace or suppress deprecated usages 2024-01-26 10:06:18 -08:00
decoder_flac Remove Multidex 2024-07-24 16:17:00 +01:00
decoder_iamf Fix WrongConstant lint failure for IamfDecoder#OUTPUT_PCM_ENCODING 2024-09-02 10:20:55 -07:00
decoder_midi Add missing module registrations 2024-05-23 04:50:01 -07:00
decoder_opus Remove Multidex 2024-07-24 16:17:00 +01:00
decoder_vp9 Remove Multidex 2024-07-24 16:17:00 +01:00
effect Remove @DoNotInline annotations 2024-09-18 04:47:39 -07:00
exoplayer Ramp up volume after AudioTrack flush to avoid pop sound 2024-09-20 08:55:29 -07:00
exoplayer_dash Report initial discontinuity for DASH periods that require preroll 2024-08-29 01:57:15 -07:00
exoplayer_hls Automated Code Change 2024-08-07 12:28:25 -07:00
exoplayer_ima Remove Multidex 2024-07-24 16:17:00 +01:00
exoplayer_rtsp Format with google-java-format 2024-09-12 04:47:05 +00:00
exoplayer_smoothstreaming Improve frame rate calculation by using media duration from mdhd box 2024-09-18 10:42:11 -07:00
exoplayer_workmanager Remove exoplayer2-only javadoc machinery from media3 2023-06-05 09:47:58 +00:00
extractor Improve frame rate calculation by using media duration from mdhd box 2024-09-18 10:42:11 -07:00
muxer Change the default value of lastSampleDurationBehavior 2024-09-16 10:02:10 -07:00
session Fix sending custom commands with a media browser 2024-09-19 12:35:42 -07:00
test_data Fix CapturingMuxer writing of final PCM audio sample to dump file. 2024-09-19 09:52:12 -07:00
test_exoplayer_playback Revert erroneous changes 2024-07-24 16:17:02 +01:00
test_session_common Fix sending custom commands with a media browser 2024-09-19 12:35:42 -07:00
test_session_current Fix sending custom commands with a media browser 2024-09-19 12:35:42 -07:00
test_utils Format Format.frameRate to two decimal places before dumping 2024-09-18 08:14:52 -07:00
test_utils_robolectric Bump minSdk to 21 and remove resulting simple dead code 2024-07-12 08:11:01 -07:00
transformer Fix CapturingMuxer writing of final PCM audio sample to dump file. 2024-09-19 09:52:12 -07:00
ui Remove @DoNotInline annotations 2024-09-18 04:47:39 -07:00
ui_leanback Bump effect and leanback minSdk to 19 2024-01-10 07:22:00 -08:00
lint.xml Update recommended way to suppress @UnstableApi errors in lint.xml 2023-11-15 02:34:40 -08:00