audio/vorbis: Bug fix: Resampling didn't work correctly

This commit is contained in:
Hajime Hoshi 2021-01-19 00:41:47 +09:00
parent a0a8d41ff6
commit fbc7b3c884

View File

@ -160,7 +160,7 @@ func DecodeWithSampleRate(sampleRate int, src io.ReadSeeker) (*Stream, error) {
size *= 2
}
if origSampleRate != sampleRate {
r := convert.NewResampling(s, size, sampleRate, sampleRate)
r := convert.NewResampling(s, size, origSampleRate, sampleRate)
s = r
size = r.Length()
}