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

LibAudio: Expose the format name from the loader plugins

The format of these names is "Full Abbreviation (.fileformat)". For
example: "FLAC (.flac)", "RIFF WAVE (.wav)", "MPEG Layer III (.mp3)",
"Vorbis (.ogg)" The reasoning is that the container and therefore the
file ending may differ significantly from the actual format, and the
format should be given as unambiguously as possible and necessary.
This commit is contained in:
kleines Filmröllchen 2022-01-14 12:32:42 +01:00 committed by Andreas Kling
parent dc89ac1463
commit 54ac4ba8cc
3 changed files with 5 additions and 0 deletions

View file

@ -52,6 +52,7 @@ public:
virtual int total_samples() override { return m_total_samples; }
virtual u32 sample_rate() override { return m_sample_rate; }
virtual u16 num_channels() override { return m_num_channels; }
virtual String format_name() override { return "RIFF WAVE (.wav)"; }
virtual PcmSampleFormat pcm_format() override { return m_sample_format; }
virtual RefPtr<Core::File> file() override { return m_file; }