Bug 1140450 - Lower speex_resampler quality for Web Audio API. r=padenot

This commit is contained in:
Baptiste Emmanuel 2015-05-21 10:12:23 +02:00
parent e7143df6e7
commit b35b448d9c
4 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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));
}

View File

@ -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;