media/libraries/common/src/test/java/androidx/media3/common
ivanbuper e88d6fe459 Fix truncation error acumulation for Sonic's resampling algorithm
Sonic would accumulate truncation errors on float to int conversions
that caused the final output sample count to drift noticeably, by
hundreds of samples on streams of a few minutes of length. The fix now
keeps track of the truncation error and compensates for it.

Other small fixes include eliminating lossy operations (e.g. int
division) and using doubles instead of floats for resampling where
helpful.

This CL also introduces `SonicParameterizedTest`, which helps test
resampling on an arbitrary number of randomly generated parameters,
with random sample data. `SonicParameterizedTest` uses `BigDecimal`s
for calculating sample count values, as to avoid precision issues with
large sample counts.

PiperOrigin-RevId: 673852768
2024-09-12 08:14:25 -07:00
..
audio Fix truncation error acumulation for Sonic's resampling algorithm 2024-09-12 08:14:25 -07:00
text Rename VTT voice span speakerName to name 2024-08-29 10:25:06 +01:00
util Move getCodecProfileAndLevel to CodecSpecificDataUtil 2024-09-06 06:52:29 -07:00
AdPlaybackStateTest.java Use full MediaItem to define ad playbacks 2023-11-14 08:35:14 -08:00
AudioAttributesTest.java Deprecate Bundleable and Bundleable.Creator 2023-11-03 08:27:21 -07:00
BasePlayerTest.java Forward presumed no-op seeks to handler methods in (Simple)BasePlayer 2024-04-15 02:38:29 -07:00
BundleListRetrieverTest.java Make BundleListRetriever local Binder aware 2023-10-10 02:22:56 -07:00
CTest.java Update to androidx.media3 2021-10-27 09:12:46 +01:00
DeviceInfoTest.java Deprecate Bundleable and Bundleable.Creator 2023-11-03 08:27:21 -07:00
DrmInitDataTest.java Remove duplication of various TestUtil methods 2023-08-31 08:23:33 -07:00
FileTypesTest.java Update to androidx.media3 2021-10-27 09:12:46 +01:00
FlagSetTest.java Refactor transformation completion 2022-11-22 09:44:47 +00:00
FormatTest.java Formatting fixes 2024-06-24 16:10:13 +01:00
ForwardingPlayerTest.java Rename DefaultTrackSelector.ParametersBuilder to Parameters.Builder 2022-06-07 16:29:17 +00:00
ForwardingSimpleBasePlayerTest.java Add ForwardingSimpleBasePlayer 2024-07-08 01:15:16 -07:00
MediaItemTest.java Remove Bundleable type & Bundleable.Creator<Foo> CREATOR fields 2024-06-11 08:05:32 -07:00
MediaLibraryInfoTest.java Add tests for MediaLibraryInfo version code consistency 2023-05-08 15:18:59 +00:00
MediaMetadataTest.java Add metadata field durationMs 2024-04-25 05:05:42 -07:00
MetadataTest.java Add timestamp to Metadata 2022-07-04 19:36:57 +00:00
MimeTypesTest.java Update supported image formats in line with platform standards 2024-05-14 09:50:38 -07:00
PlaybackExceptionTest.java Sync and map fatal and non-fatal errors from and to the legacy session 2024-06-12 06:26:00 -07:00
PlaybackParametersTest.java Deprecate Bundleable and Bundleable.Creator 2023-11-03 08:27:21 -07:00
PlayerTest.java Add a test to enforce Player remains unstable-for-implementors 2023-04-05 15:44:49 +01:00
PositionInfoTest.java Deprecate Bundleable and Bundleable.Creator 2023-11-03 08:27:21 -07:00
RatingTest.java Deprecate Bundleable and Bundleable.Creator 2023-11-03 08:27:21 -07:00
SimpleBasePlayerTest.java Allow externally provided Timeline in SimpleBasePlayer.State 2024-07-05 09:39:49 -07:00
StreamKeyTest.java Make StreamKey Bundleable and remove deprecated trackIndex 2023-06-09 13:57:05 +00:00
TimelineTest.java Remove deprecated Timeline.Window.isLive field 2024-05-24 04:37:04 -07:00
TrackGroupTest.java Make BundleableUtil more generic by taking Function parameters 2023-11-02 03:17:17 -07:00
TrackSelectionOverrideTest.java Tracks.Group/TrackGroup variable naming disambiguation 2022-04-26 14:37:35 +01:00
TrackSelectionParametersTest.java Add isPrioritizeImageOverVideoEnabled to TrackSelectionParameters 2023-10-24 10:01:22 -07:00
TracksTest.java Deprecate Bundleable and Bundleable.Creator 2023-11-03 08:27:21 -07:00
VideoSizeTest.java Further unapplied rotation clean-up 2024-07-16 03:35:46 -07:00