[audio_core] Fractional position when mute
While adding resampler-related test cases and related refactoring, in preparation for adding new resamplers, test cases exposed MTWN-296 in the mixer core: To handle step_size limitations, the mixer uses modulo|numerator| denominator values for any rate or position fractional components that cannot be captured with the 13 bits of fixed-point fraction. For a given mix pass, we calculate end position using these values, doing so correctly in the usual case of producing every frame, but slightly incorrectly in the optimization case of MUTED (whether explicitly muted, or gain is simply too low to ever produce a value). This defect would primarily be exposed when performing very fine-grained rate adjustments. This CL therefore contains the test-code refactoring so far, plus the test cases that exposed the bug, and the product fix, as well as additional test cases to verify that no other related bugs lurked. Test: 15 new test cases, bringing the total to 170 ('audio_mixer_tests --full' in basic_envs on all products.boards) BUG: MTWN-296 #done Change-Id: If41e20af77bcebbbad7aaf7d5301fded6c027dc3
Showing
- src/media/audio/audio_core/mixer/linear_sampler.cc 43 additions, 71 deletionssrc/media/audio/audio_core/mixer/linear_sampler.cc
- src/media/audio/audio_core/mixer/point_sampler.cc 68 additions, 36 deletionssrc/media/audio/audio_core/mixer/point_sampler.cc
- src/media/audio/audio_core/mixer/test/audio_performance.cc 24 additions, 9 deletionssrc/media/audio/audio_core/mixer/test/audio_performance.cc
- src/media/audio/audio_core/mixer/test/audio_performance.h 4 additions, 4 deletionssrc/media/audio/audio_core/mixer/test/audio_performance.h
- src/media/audio/audio_core/mixer/test/main.cc 1 addition, 1 deletionsrc/media/audio/audio_core/mixer/test/main.cc
- src/media/audio/audio_core/mixer/test/mixer_gain_tests.cc 17 additions, 27 deletionssrc/media/audio/audio_core/mixer/test/mixer_gain_tests.cc
- src/media/audio/audio_core/mixer/test/mixer_resampling_tests.cc 169 additions, 77 deletions...dia/audio/audio_core/mixer/test/mixer_resampling_tests.cc
- src/media/audio/audio_core/mixer/test/mixer_response_tests.cc 10 additions, 2 deletions...media/audio/audio_core/mixer/test/mixer_response_tests.cc
- src/media/audio/audio_core/mixer/test/mixer_tests_recap.cc 56 additions, 36 deletionssrc/media/audio/audio_core/mixer/test/mixer_tests_recap.cc
Loading
Please register or sign in to comment