mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 15:47:35 +00:00
Applications+Userland: Switch to new Audio::Loader API
This commit is contained in:
parent
1f47b01e3b
commit
bad8cd3d8f
5 changed files with 31 additions and 35 deletions
|
@ -27,8 +27,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Vector.h>
|
||||
#include <LibAudio/Buffer.h>
|
||||
#include <LibAudio/ClientConnection.h>
|
||||
#include <LibAudio/WavLoader.h>
|
||||
#include <LibAudio/Loader.h>
|
||||
#include <LibCore/Timer.h>
|
||||
|
||||
#define PLAYBACK_MANAGER_BUFFER_SIZE 64 * KiB
|
||||
|
@ -45,7 +46,7 @@ public:
|
|||
void seek(const int position);
|
||||
void loop(bool);
|
||||
bool toggle_pause();
|
||||
void set_loader(OwnPtr<Audio::WavLoader>&&);
|
||||
void set_loader(NonnullRefPtr<Audio::Loader>&&);
|
||||
|
||||
int last_seek() const { return m_last_seek; }
|
||||
bool is_paused() const { return m_paused; }
|
||||
|
@ -67,7 +68,7 @@ private:
|
|||
size_t m_next_ptr { 0 };
|
||||
size_t m_last_seek { 0 };
|
||||
float m_total_length { 0 };
|
||||
OwnPtr<Audio::WavLoader> m_loader { nullptr };
|
||||
RefPtr<Audio::Loader> m_loader { nullptr };
|
||||
NonnullRefPtr<Audio::ClientConnection> m_connection;
|
||||
RefPtr<Audio::Buffer> m_next_buffer;
|
||||
RefPtr<Audio::Buffer> m_current_buffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue