Files
ladybird/Libraries/LibAudio/AClientConnection.h
Andreas Kling 426248098c Audio: Make basic streaming WAV playback work.
I had to solve a bunch of things simultaneously to make this work.
Refactor AWavLoader to be a streaming loader rather than a one-shot one.
The constructor parses the header, and if everything looks good, you can
repeatedly ask the AWavLoader for sample buffers until it runs out.

Also send a message from AudioServer when a buffer has finished playing.
That allows us to implement a blocking variant of play().

Use all of this in aplay to play WAV files chunk-at-a-time.
This is definitely not perfect and it's a little glitchy and skippy,
but I think it's a step in the right direction.
2019-07-27 17:27:05 +02:00

16 lines
346 B
C++

#pragma once
#include <LibAudio/ASAPI.h>
#include <LibCore/CoreIPCClient.h>
class ABuffer;
class AClientConnection : public IPC::Client::Connection<ASAPI_ServerMessage, ASAPI_ClientMessage> {
C_OBJECT(AClientConnection)
public:
AClientConnection();
virtual void handshake() override;
void play(const ABuffer&, bool block);
};