mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 1675878 - Don't resample high-sample-rate audio down to a standard rate. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D97018
This commit is contained in:
parent
ce553ffb6c
commit
2b0b162565
@ -188,11 +188,9 @@ uint32_t DecideAudioPlaybackSampleRate(const AudioInfo& aInfo) {
|
||||
|
||||
if (resampling) {
|
||||
rate = 48000;
|
||||
} else if (aInfo.mRate == 44100 || aInfo.mRate == 48000) {
|
||||
} else if (aInfo.mRate >= 44100) {
|
||||
// The original rate is of good quality and we want to minimize unecessary
|
||||
// resampling. The common scenario being that the sampling rate is one or
|
||||
// the other. This minimizes audio quality regressions but depends on
|
||||
// content providers not changing rates mid-stream.
|
||||
// resampling, so we let cubeb decide how to resample (if needed).
|
||||
rate = aInfo.mRate;
|
||||
} else {
|
||||
// We will resample all data to match cubeb's preferred sampling rate.
|
||||
|
Loading…
Reference in New Issue
Block a user