mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
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`.
This commit is contained in:
parent
1444b42936
commit
2d6124049a
Notes:
sideshowbarker
2024-07-17 05:47:32 +09:00
Author: https://github.com/LucasChollet Commit: https://github.com/SerenityOS/serenity/commit/2d6124049a Pull-request: https://github.com/SerenityOS/serenity/pull/15568 Reviewed-by: https://github.com/linusg ✅ Reviewed-by: https://github.com/sin-ack ✅
6 changed files with 3 additions and 5 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue