1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 07:37:35 +00:00

LibAudio: Resample FLAC audio data

FlacLoader initialized, but never used its resampler; this is now fixed
and all subframes are resampled before decorrelation occurs. FLAC files
with non-44100-Hz sample rates now play properly.
This commit is contained in:
kleines Filmröllchen 2021-08-17 00:50:34 +02:00 committed by Andreas Kling
parent d7ca60b998
commit 195d6d006f
2 changed files with 5 additions and 8 deletions

View file

@ -124,7 +124,7 @@ private:
bool m_valid { false };
RefPtr<Core::File> m_file;
String m_error_string;
OwnPtr<ResampleHelper<double>> m_resampler;
OwnPtr<ResampleHelper<i32>> m_resampler;
// Data obtained directly from the FLAC metadata: many values have specific bit counts
u32 m_sample_rate { 0 }; // 20 bit