mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:27:35 +00:00
SoundPlayer: Load cover image from music files
When the visualization is set to "Album Cover", the player will now try to load the embedded image. On failure, it defaults to a "Cover" image file in the directory. In Player::play_file_path, file_name_changed now needs to be executed after that the loader have been set, to get the correct image.
This commit is contained in:
parent
27539440df
commit
7649feb26f
8 changed files with 58 additions and 10 deletions
|
@ -11,6 +11,7 @@
|
|||
#include "Playlist.h"
|
||||
#include "PlaylistWidget.h"
|
||||
#include <AK/RefPtr.h>
|
||||
#include <LibAudio/GenericTypes.h>
|
||||
#include <LibAudio/Sample.h>
|
||||
|
||||
class Player {
|
||||
|
@ -75,6 +76,8 @@ public:
|
|||
virtual void total_samples_changed(int) = 0;
|
||||
virtual void sound_buffer_played(FixedArray<Audio::Sample> const&, [[maybe_unused]] int sample_rate, [[maybe_unused]] int samples_played) = 0;
|
||||
|
||||
Vector<Audio::PictureData> const& pictures() const;
|
||||
|
||||
protected:
|
||||
void done_initializing()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue