roar_vs_read(3)
π roar_vs_read(3) π
okay bestie, we're in the RoarAudio Programmer's Manual today and the page is roar_vs_read(3) β yes, and its ride-or-die twin roar_vs_write(3) is coming along too, they're a package deal fr fr π«Ά
β¨ NAME β¨
roar_vs_read, roar_vs_write β read or write data from or to the sound server π§
πΈ SYNOPSIS πΈ
#include <roaraudio.h>
ssize_t roar_vs_read (roar_vs_t * vss, void * buf, size_t len, int
* error);
ssize_t roar_vs_write(roar_vs_t * vss, const void * buf, size_t len, int
* error);
like, that's the whole vibe right there π
π¦ DESCRIPTION π¦
roar_vs_read() reads data from the sound server into the buffer buf. data comes IN, you get it, slay β¨
roar_vs_write() writes data in the buffer buf to the sound server. data goes OUT, you sent it, iconic π
π PARAMETERS π
vssβ the VS object that data is read from or written to. it's the main character of this whole operation, no cap πbufβ the buffer to read to or write from. it's literally where the bytes live π¦lenβ the length of the data to be read or written, in byte. yes, byte, singular, that's what it says πerrorβ a pointer to an integer used to store the error value in case of error. you can passNULLif you're not using it, but bestieβ¦ it is very recommended to use this error value so you can report good error messages to the user. please. for me. π
β RETURN VALUE β
On success, these calls return the amount of data read or written. heads up tho β this can be smaller than the requested size. that's not a bug, that's just how it is, so don't come for it π
On error, -1 is returned. that's the sad path π«
π₯ EXAMPLES π₯
FIXME
not me puttingFIXMEin the examples section π the docs said "we'll do it later" and then simply did not. the audacity. anyway bestie, the examples areFIXME, that's the whole content, I'm just the messenger πΈ
π SEE ALSO π
go read those too, they're giving lore π
and that's the page!! RoarAudio, May 2011 β yeah this one's been around a minute, it's vintage and we love her for it ππ byeee π¦β¨
π¦ where this page comes from
- ubuntu jammy: libroar-dev 1.0~beta12-4 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms