mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibAudio+LibDSP: Switch samples to 32-bit float instead of 64-bit float
This has been overkill from the start, and it has been bugging me for a long time. With this change, we're probably a bit slower on most platforms but save huge amounts of space with all in-memory sample datastructures.
This commit is contained in:
parent
39c0f31009
commit
19a4b820c4
16 changed files with 329 additions and 329 deletions
|
@ -19,7 +19,7 @@ static FixedArray<Audio::Sample> music_samples_to_buffer(Vector<Music::Sample>&
|
|||
{
|
||||
FixedArray<Audio::Sample> samples = MUST(FixedArray<Audio::Sample>::try_create(music_samples.size()));
|
||||
for (size_t i = 0; i < music_samples.size(); ++i)
|
||||
samples[i] = { static_cast<double>(music_samples[i].left) / AK::NumericLimits<i16>::max(), static_cast<double>(music_samples[i].right) / AK::NumericLimits<i16>::max() };
|
||||
samples[i] = { static_cast<float>(music_samples[i].left) / AK::NumericLimits<i16>::max(), static_cast<float>(music_samples[i].right) / AK::NumericLimits<i16>::max() };
|
||||
|
||||
return samples;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue