core: use SAMPLE_FMT_FLT only
There's no real reason not to use float for audio. It's light on system resources (compared to everything else we're doing at least) and the code becomes simpler when we can assume all audio will be -1 to 1 rather than 0 to 255 or -32768 to 32767. The only thing we might want to do one day is move up to SAMPLE_FMT_DBL, but this should only take some mild refactoring and all our assumptions (i.e. -1 to 1 range, etc.) can remain the same.
This commit is contained in:
@@ -25,9 +25,10 @@ QString SampleFormat::GetSampleFormatName(const SampleFormat::Format &f)
|
||||
return tr("Invalid");
|
||||
}
|
||||
|
||||
SampleFormat::Format SampleFormat::GetConfiguredFormatForMode(RenderMode::Mode mode)
|
||||
SampleFormat::Format SampleFormat::GetConfiguredFormatForMode(RenderMode::Mode /*mode*/)
|
||||
{
|
||||
return static_cast<SampleFormat::Format>(Core::GetPreferenceForRenderMode(mode, QStringLiteral("SampleFormat")).toInt());
|
||||
//return static_cast<SampleFormat::Format>(Core::GetPreferenceForRenderMode(mode, QStringLiteral("SampleFormat")).toInt());
|
||||
return SAMPLE_FMT_FLT;
|
||||
}
|
||||
|
||||
void SampleFormat::SetConfiguredFormatForMode(RenderMode::Mode mode, SampleFormat::Format format)
|
||||
|
||||
Reference in New Issue
Block a user