roar_vs_iterate(3)
π roar_vs_iterate β the roar_vs_iterate(3) glow-up β¨
okay bestie, sit down, hydrate, and let me tell you about roar_vs_iterate and its ride-or-die roar_vs_run from the RoarAudio Programmer's Manual. it's giving stream iteration, and honestly? we're obsessed. π¦
πΈ NAME πΈ
roar_vs_iterate, roar_vs_run β the two functions that iterate streams. that's it. that's the vibe. π
β¨ SYNOPSIS β¨
#include <roaraudio.h>
int roar_vs_iterate (roar_vs_t * vss, int wait, int * error);
int roar_vs_run (roar_vs_t * vss, int * error);
like, look at those signatures. so clean. so iconic. no notes. π
π DESCRIPTION π
okay so here's the tea, bestie. π
roar_vs_iterate() does the actual work: it sends a block of data from the local buffer to the server, or it reads data from the server into the local buffer β and when it's doing that, it's in blocking mode. OR, if you're in file mode, it pushes or pulls data to or from the server. either way, data is moving. main character behavior fr fr. π₯
roar_vs_run() is the same thing as roar_vs_iterate() except it's the loops-forever version β it keeps going until EOF or an error shows up. no cap. it just keeps iterating. periodt. π
π§ PARAMETERS π§
vssβ the VS object you're using. your little guy. your blorbo. π«Άwaitβ the patience setting, lowkey. if it'sROAR_VS_WAIT, thenroar_vs_iterate()will block until data has been synced with the server. if it'sROAR_VS_NOWAIT, thenroar_vs_iterate()will not block if no data can be send to or read from the server. choose wisely bestie, one of these makes you wait and one of these does not. πerrorβ a pointer to an integer where the error value gets stored if something goes wrong. it can beNULLif you're not using it, but hiiiighkey it is very recommended to actually use this error value so you can report good error messages to the user. don't be the person who passesNULLand then has no idea why everything is on fire. π
β RETURN VALUE β
okay so, the receipts: π
- On EOF these calls return
0. roar_vs_iterate()returns a positive value on non-EOF success. slay.- On error,
-1is returned. π
π EXAMPLES π
FIXME
(the original literally just says FIXME bestie, I'm not gonna invent examples and lie to you, that would be so not it π)
π SEE ALSO π
go read those too, iykyk. πβ¨
mwah π that's a wrap! this little page came to you from the fine folks at RoarAudio, dated June 2011 β yeah she's a vintage icon, an OG, and she still eats. ππβ¨
π¦ 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