SoundPlayer: Reduce sample buffer size and add a sample load event

This commit is contained in:
Cesar Torres 2021-03-21 13:43:27 +01:00 committed by Andreas Kling
commit f9e4bff487
Notes: sideshowbarker 2024-07-18 21:02:49 +09:00
3 changed files with 10 additions and 3 deletions

View file

@ -32,7 +32,7 @@
#include <LibAudio/Loader.h>
#include <LibCore/Timer.h>
#define PLAYBACK_MANAGER_BUFFER_SIZE 64 * KiB
#define PLAYBACK_MANAGER_BUFFER_SIZE 48 * KiB
#define PLAYBACK_MANAGER_RATE 44100
class PlaybackManager final {
@ -56,6 +56,7 @@ public:
NonnullRefPtr<Audio::ClientConnection> connection() const { return m_connection; }
Function<void()> on_update;
Function<void(Audio::Buffer&)> on_load_sample_buffer;
private:
void next_buffer();