You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
573 B
30 lines
573 B
|
4 years ago
|
#pragma once
|
||
|
|
#ifndef NOSOUND
|
||
|
|
|
||
|
|
#include <memory>
|
||
|
|
|
||
|
|
#include <Aulib/Stream.h>
|
||
|
|
|
||
|
|
#ifdef DVL_AULIB_SUPPORTS_SDL_RESAMPLER
|
||
|
|
#include <Aulib/ResamplerSdl.h>
|
||
|
|
#else
|
||
|
|
#include <Aulib/ResamplerSpeex.h>
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#include "options.h"
|
||
|
|
|
||
|
|
namespace devilution {
|
||
|
|
|
||
|
|
inline std::unique_ptr<Aulib::Resampler> CreateAulibResampler()
|
||
|
|
{
|
||
|
|
#ifdef DVL_AULIB_SUPPORTS_SDL_RESAMPLER
|
||
|
|
return std::make_unique<Aulib::ResamplerSdl>();
|
||
|
|
#else
|
||
|
|
return std::make_unique<Aulib::ResamplerSpeex>(*sgOptions.Audio.resamplingQuality);
|
||
|
|
#endif
|
||
|
|
}
|
||
|
|
|
||
|
|
} // namespace devilution
|
||
|
|
|
||
|
|
#endif // !NOSOUND
|