mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 19:45:47 -04:00
FullscreenUI: Re-enable most previously-missing settings
This commit is contained in:
@ -62,12 +62,20 @@ u32 AudioStream::GetMSForBufferSize(u32 sample_rate, u32 buffer_size)
|
||||
}
|
||||
|
||||
static constexpr const auto s_stretch_mode_names = make_array("None", "Resample", "TimeStretch");
|
||||
static constexpr const auto s_stretch_mode_display_names = make_array("None", "Resampling", "Time Stretching");
|
||||
|
||||
const char* AudioStream::GetStretchModeName(AudioStretchMode mode)
|
||||
{
|
||||
return (static_cast<u32>(mode) < s_stretch_mode_names.size()) ? s_stretch_mode_names[static_cast<u32>(mode)] : "";
|
||||
}
|
||||
|
||||
const char* AudioStream::GetStretchModeDisplayName(AudioStretchMode mode)
|
||||
{
|
||||
return (static_cast<u32>(mode) < s_stretch_mode_display_names.size()) ?
|
||||
s_stretch_mode_display_names[static_cast<u32>(mode)] :
|
||||
"";
|
||||
}
|
||||
|
||||
std::optional<AudioStretchMode> AudioStream::ParseStretchMode(const char* name)
|
||||
{
|
||||
for (u8 i = 0; i < static_cast<u8>(AudioStretchMode::Count); i++)
|
||||
|
@ -41,6 +41,7 @@ public:
|
||||
static u32 GetMSForBufferSize(u32 sample_rate, u32 buffer_size);
|
||||
|
||||
static const char* GetStretchModeName(AudioStretchMode mode);
|
||||
static const char* GetStretchModeDisplayName(AudioStretchMode mode);
|
||||
static std::optional<AudioStretchMode> ParseStretchMode(const char* name);
|
||||
|
||||
ALWAYS_INLINE u32 GetSampleRate() const { return m_sample_rate; }
|
||||
|
Reference in New Issue
Block a user