mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:38:11 +00:00
AudioServer: Assorted infrastructure work
* Add a LibAudio, and move WAV file parsing there (via AWavFile and AWavLoader) * Add CLocalSocket, and CSocket::connect() variant for local address types. We make some small use of this in WindowServer (as that's where we modelled it from), but don't get too invasive as this PR is already quite large, and the WS I/O is a bit carefully done * Add an AClientConnection which will eventually be used to talk to AudioServer (and make use of it in Piano, though right now it really doesn't do anything except connect, using our new CLocalSocket...)
This commit is contained in:
parent
983245113a
commit
ffa8cb668f
22 changed files with 431 additions and 162 deletions
19
Libraries/LibCore/CLocalSocket.cpp
Normal file
19
Libraries/LibCore/CLocalSocket.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include <LibCore/CLocalSocket.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
CLocalSocket::CLocalSocket(CObject* parent)
|
||||
: CSocket(CSocket::Type::Local, parent)
|
||||
{
|
||||
int fd = socket(AF_LOCAL, SOCK_STREAM | SOCK_CLOEXEC, 0);
|
||||
if (fd < 0) {
|
||||
set_error(fd);
|
||||
} else {
|
||||
set_fd(fd);
|
||||
set_mode(CIODevice::ReadWrite);
|
||||
set_error(0);
|
||||
}
|
||||
}
|
||||
|
||||
CLocalSocket::~CLocalSocket()
|
||||
{
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue