ROAR_STREAM_ADD_DATA(3)

πŸ“¦ version 1.0~beta12, in ubuntu jammy

πŸ’– roar_str...add_data(3) πŸ’–

okay bestie, so this is a page from the System Manager's Manual: RoarAudio and we're literally about to learn how to yeet data into a stream's input buffer through the control connection. no cap. let's go πŸ¦‹


✨ NAME ✨

roar_stream_add_data β€” adds data to a stream's input buffer using the control connection πŸ’…


🌸 SYNOPSIS 🌸

#include <roaraudio.h>

int roar_stream_add_data(struct roar_connection * con, struct
roar_stream * s, char * data, size_t len);

πŸ‘‘ DESCRIPTION πŸ‘‘

so this one adds data to the input buffer of a stream. it's giving very much like doing this:

write(stream_fh, data, len);

except β€” plot twist β€” it uses the control channel to add the data instead. same energy, different route. periodt. πŸ’œ


πŸŽ€ PARAMETERS πŸŽ€

  • con β€” the connection to the server. your lil hotline to roard, basically 🫢
  • s β€” the stream we're adding data to its input buffer. yes queen, this is the one getting fed
  • data β€” the data to add to the buffer. the actual goods πŸ“¦
  • len β€” the length of the data to be added. how many bytes we're serving

⭐ RETURN VALUE ⭐

on success these calls return 0. on error, -1 is returned. simple as that, no drama πŸ’€


🌈 EXAMPLES 🌈

FIXME

(yeah bestie, the examples are literally unwritten, it's giving incomplete but we move πŸ™ˆ)


πŸ’€ BUGS πŸ’€

okay so, not to be the bearer of bad news but… this call doesn't work with the current roard. the server does not use all of the buffer size and complains about underruns. so like, it's broken broken. crying shaking throwing up 😭

πŸ”₯ SEE ALSO πŸ”₯

write(2), libroar(7), RoarAudio(7).


k that's the whole page bestie!! πŸŽ€βœ¨ this was RoarAudio, dated May 2011, and honestly the vibes were immaculate even if the function is lowkey busted. go drink some water, ily, byeee πŸ’–πŸ§š

πŸ“¦ where this page comes from