Browse Source

`CreateAulibResampler`: Check the real sample rate

The requested sample rate is merely preferred and the actual rate may be
different.
pull/5703/merge
Gleb Mazovetskiy 3 years ago committed by Anders Jenbo
parent
commit
beb6fc2aaf
  1. 2
      Source/utils/aulib.hpp

2
Source/utils/aulib.hpp

@ -19,7 +19,7 @@ namespace devilution {
inline std::unique_ptr<Aulib::Resampler> CreateAulibResampler(int sourceRate)
{
if (static_cast<int>(*sgOptions.Audio.sampleRate) == sourceRate)
if (Aulib::sampleRate() == sourceRate)
return nullptr;
switch (*sgOptions.Audio.resampler) {
#ifdef DEVILUTIONX_RESAMPLER_SPEEX

Loading…
Cancel
Save