muroar_write(3)
π NAME π
muroar_write β bestie, this is the one that writes data to a stream in a portable way β¨
πΈ SYNOPSIS πΈ
#include <muroar.h>
ssize_t muroar_write (muroar_t fh, const void * buf, size_t len);
π¦ DESCRIPTION π¦
okay so picture this: you have a chunk of data and you need it to end up on a connected stream. That's literally the whole job of this function, and it eats that block of data and sends it off. π«Ά
The vibe here β the actual point β is that it gives you a portable way to ship your data to the sound server, one that does not depend on the underlying operating system. Same call, every OS, no chaos. no cap. π
π PARAMETERS π
fhβ the stream file handle that's connected to the server. It must be opened usingmuroar_stream(3), no shortcuts, no substitutes. πbufβ a pointer to the block of data you want written. that's the stuff going out the door. π€lenβ the total length, in bytes, of the data you want written. yes, bytes. count them properly. π
β¨ RETURN VALUE β¨
- On success: the number of bytes it actually managed to write. π
- On error:
-1comes back and it's giving π.
π NOTES π
lowkey important, so listen up:
This function calls the underlying write function in a loop. So if that call returns less than the length you handed it, do not just re-try directly β you should wait at least some milisecunds first. periodt. π
π HISTORY π
This function first appeared in muRoar version 0.1beta0. baby's first era. iconic. β
π₯ SEE ALSO π₯
and that's a wrap on the muRoar Programmer's Manual: IO Extension page for muroar_write, served fresh from muRoar, dated April 2012. π go forth and write your bytes, bestie π§πΈ
π¦ where this page comes from
- ubuntu jammy: libmuroar-dev 0.1.13-7 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms