diff options
author | Lucas CHOLLET <lucas.chollet@free.fr> | 2022-10-12 18:20:39 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-10-14 23:11:23 +0200 |
commit | 2d6124049a5d58865d3ecf206529d1bb1292c289 (patch) | |
tree | 17dc41f2eeb04a38e3c332f6314f6bd1c882677c /Userland | |
parent | 1444b42936698330398475eba88c370e2b676bf8 (diff) | |
download | serenity-2d6124049a5d58865d3ecf206529d1bb1292c289.zip |
LibAudio: Get rid of unused method `Loader::file()`
`aplay` and two files of `SoundPlayer` were relying on the include of
`LibCore/File.h` by `Loader.h`.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Applications/SoundPlayer/Player.cpp | 1 | ||||
-rw-r--r-- | Userland/Applications/SoundPlayer/Playlist.cpp | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibAudio/FlacLoader.h | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibAudio/Loader.h | 3 | ||||
-rw-r--r-- | Userland/Libraries/LibAudio/MP3Loader.h | 1 | ||||
-rw-r--r-- | Userland/Utilities/aplay.cpp | 1 |
6 files changed, 3 insertions, 5 deletions
diff --git a/Userland/Applications/SoundPlayer/Player.cpp b/Userland/Applications/SoundPlayer/Player.cpp index 5238fbb2b0..75bb45b876 100644 --- a/Userland/Applications/SoundPlayer/Player.cpp +++ b/Userland/Applications/SoundPlayer/Player.cpp @@ -6,6 +6,7 @@ */ #include "Player.h" +#include <LibCore/File.h> Player::Player(Audio::ConnectionToServer& audio_client_connection) : m_audio_client_connection(audio_client_connection) diff --git a/Userland/Applications/SoundPlayer/Playlist.cpp b/Userland/Applications/SoundPlayer/Playlist.cpp index 69db139f07..90eec5a919 100644 --- a/Userland/Applications/SoundPlayer/Playlist.cpp +++ b/Userland/Applications/SoundPlayer/Playlist.cpp @@ -10,6 +10,7 @@ #include <AK/LexicalPath.h> #include <AK/Random.h> #include <LibAudio/Loader.h> +#include <LibCore/File.h> #include <LibGUI/MessageBox.h> bool Playlist::load(StringView path) diff --git a/Userland/Libraries/LibAudio/FlacLoader.h b/Userland/Libraries/LibAudio/FlacLoader.h index 009e8e7c5d..58373a3ada 100644 --- a/Userland/Libraries/LibAudio/FlacLoader.h +++ b/Userland/Libraries/LibAudio/FlacLoader.h @@ -66,7 +66,6 @@ public: virtual u16 num_channels() override { return m_num_channels; } virtual String format_name() override { return "FLAC (.flac)"; } virtual PcmSampleFormat pcm_format() override { return m_sample_format; } - virtual RefPtr<Core::File> file() override { return m_file; } bool is_fixed_blocksize_stream() const { return m_min_block_size == m_max_block_size; } bool sample_count_unknown() const { return m_total_samples == 0; } diff --git a/Userland/Libraries/LibAudio/Loader.h b/Userland/Libraries/LibAudio/Loader.h index beacfc31c6..737d7dfe96 100644 --- a/Userland/Libraries/LibAudio/Loader.h +++ b/Userland/Libraries/LibAudio/Loader.h @@ -18,7 +18,6 @@ #include <LibAudio/LoaderError.h> #include <LibAudio/Sample.h> #include <LibAudio/SampleFormats.h> -#include <LibCore/File.h> namespace Audio { @@ -54,7 +53,6 @@ public: // Human-readable name of the file format, of the form <full abbreviation> (.<ending>) virtual String format_name() = 0; virtual PcmSampleFormat pcm_format() = 0; - virtual RefPtr<Core::File> file() = 0; }; class Loader : public RefCounted<Loader> { @@ -73,7 +71,6 @@ public: u16 num_channels() const { return m_plugin->num_channels(); } String format_name() const { return m_plugin->format_name(); } u16 bits_per_sample() const { return pcm_bits_per_sample(m_plugin->pcm_format()); } - RefPtr<Core::File> file() const { return m_plugin->file(); } private: static Result<NonnullOwnPtr<LoaderPlugin>, LoaderError> try_create(StringView path); diff --git a/Userland/Libraries/LibAudio/MP3Loader.h b/Userland/Libraries/LibAudio/MP3Loader.h index 092ca85aba..4685d2de2f 100644 --- a/Userland/Libraries/LibAudio/MP3Loader.h +++ b/Userland/Libraries/LibAudio/MP3Loader.h @@ -35,7 +35,6 @@ public: virtual u32 sample_rate() override { return m_sample_rate; } virtual u16 num_channels() override { return m_num_channels; } virtual PcmSampleFormat pcm_format() override { return m_sample_format; } - virtual RefPtr<Core::File> file() override { return m_file; } virtual String format_name() override { return "MP3 (.mp3)"; } private: diff --git a/Userland/Utilities/aplay.cpp b/Userland/Utilities/aplay.cpp index d846fc702b..ed57cfc685 100644 --- a/Userland/Utilities/aplay.cpp +++ b/Userland/Utilities/aplay.cpp @@ -11,6 +11,7 @@ #include <LibAudio/Resampler.h> #include <LibCore/ArgsParser.h> #include <LibCore/EventLoop.h> +#include <LibCore/File.h> #include <LibCore/System.h> #include <LibMain/Main.h> #include <math.h> |