mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1140450 - Lower speex_resampler quality for Web Audio API. r=padenot
This commit is contained in:
parent
e7143df6e7
commit
b35b448d9c
@ -2523,7 +2523,7 @@ SourceMediaStream::ResampleAudioToGraphSampleRate(TrackData* aTrackData, MediaSe
|
||||
SpeexResamplerState* state = speex_resampler_init(channels,
|
||||
aTrackData->mInputRate,
|
||||
GraphImpl()->GraphRate(),
|
||||
SPEEX_RESAMPLER_QUALITY_DEFAULT,
|
||||
SPEEX_RESAMPLER_QUALITY_MIN,
|
||||
nullptr);
|
||||
if (!state) {
|
||||
return;
|
||||
|
@ -175,7 +175,7 @@ public:
|
||||
if (!mResampler) {
|
||||
mChannels = aChannels;
|
||||
mResampler = speex_resampler_init(mChannels, mBufferSampleRate, aOutRate,
|
||||
SPEEX_RESAMPLER_QUALITY_DEFAULT,
|
||||
SPEEX_RESAMPLER_QUALITY_MIN,
|
||||
nullptr);
|
||||
} else {
|
||||
uint32_t currentOutSampleRate, currentInSampleRate;
|
||||
|
@ -87,12 +87,12 @@ public:
|
||||
mUpSampler = speex_resampler_init(aChannels,
|
||||
aSampleRate,
|
||||
aSampleRate * ValueOf(aType),
|
||||
SPEEX_RESAMPLER_QUALITY_DEFAULT,
|
||||
SPEEX_RESAMPLER_QUALITY_MIN,
|
||||
nullptr);
|
||||
mDownSampler = speex_resampler_init(aChannels,
|
||||
aSampleRate * ValueOf(aType),
|
||||
aSampleRate,
|
||||
SPEEX_RESAMPLER_QUALITY_DEFAULT,
|
||||
SPEEX_RESAMPLER_QUALITY_MIN,
|
||||
nullptr);
|
||||
mBuffer.SetLength(WEBAUDIO_BLOCK_SIZE*ValueOf(aType));
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ nsReturnRef<HRTFElevation> HRTFElevation::createBuiltin(int elevation, float sam
|
||||
|
||||
SpeexResamplerState* resampler = sampleRate == rawSampleRate ? nullptr :
|
||||
speex_resampler_init(1, rawSampleRate, sampleRate,
|
||||
SPEEX_RESAMPLER_QUALITY_DEFAULT, nullptr);
|
||||
SPEEX_RESAMPLER_QUALITY_MIN, nullptr);
|
||||
|
||||
// Load convolution kernels from HRTF files.
|
||||
int interpolatedIndex = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user