1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:47:34 +00:00

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
parent 7aa5297835
commit f9e4bff487
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();