mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 22:04:26 +00:00
Merge "audio VTS: Clarify numbers used by CompressedOffloadOutputStreamTest" am: cd290e90e8 am: 74e293fb33 am: 270c1fb0ba
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2320825 Change-Id: I19124305ae92d48f69a1b8ce1669dc542f9854bc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -955,10 +955,16 @@ TEST_P(CompressedOffloadOutputStreamTest, Mp3FormatGaplessOffload) {
|
||||
ASSERT_NO_FATAL_FAILURE(createPatchIfNeeded());
|
||||
const int presentationeEndPrecisionMs = 1000;
|
||||
const int sampleRate = 44100;
|
||||
// The duration of sine882hz3s.mp3 is: 3 seconds + (576 + 756) samples.
|
||||
// This is a mono file, thus 1 frame = 1 sample for it.
|
||||
const int fullTrackDurationMs = 3000 + (576 + 756) * 1000 / sampleRate;
|
||||
const int significantSampleNumber = (presentationeEndPrecisionMs * sampleRate) / 1000;
|
||||
// 'delay' is the amount of frames ignored at the beginning, 'padding' is the amount of frames
|
||||
// ignored at the end of the track. Extra 1000 samples are requested for trimming to reduce the
|
||||
// test running time.
|
||||
const int delay = 576 + 1000;
|
||||
const int padding = 756 + 1000;
|
||||
const int durationMs = 3000 - 44;
|
||||
const int durationMs = fullTrackDurationMs - (delay + padding) * 1000 / sampleRate;
|
||||
auto start = std::chrono::steady_clock::now();
|
||||
auto callbacks = sp<OffloadCallbacks>::make();
|
||||
std::mutex presentationEndLock;
|
||||
|
||||
Reference in New Issue
Block a user