roar_vs_close(3)
π roar_vs_close β bestie edition π
okay so this is a page from the RoarAudio Programmer's Manual, and today we're talking about roar_vs_close(3). it's giving "how do i say goodbye to my VS object" energy and honestly? iconic. let's get into it π«Ά
β¨ NAME β¨
roar_vs_close β closes a VS object. that's it. that's the whole job. slay π
πΈ SYNOPSIS πΈ
#include <roaraudio.h>
int roar_vs_close(roar_vs_t * vss, int killit, int * error);
look at her. three lil args. main character function fr fr β¨
π¦ DESCRIPTION π¦
so, this function closes an open VS object. literally what it says on the tin, no cap.
here's the cute part tho β when you close it, there's pending data (mostly network and server side buffers) and you get to pick what happens to it: it can either be played, or killed so that no pending data is played at all. the killing option is lowkey the move when you're handling errors, because in an error situation you probably don't want to sit there politely flushing buffers into the void π
π PARAMETERS π
vssβ the VS object you wanna close. the whole point of the function, bestie.killitβ specifies if the stream should be killed on the server side. must beROAR_VS_TRUEorROAR_VS_FALSE. no in-between, no vibes-based third option, just true or false πerrorβ this is a pointer to an integer used to store the error value in case of error. it can beNULLif you're not using it, but it is very recommended to use this error value so you can report good error messages to the user. like, please use it. your users deserve to know what went wrong π₯Ί
β RETURN VALUE β
- on success, these calls return
0β - on error,
-1is returned β
π₯ EXAMPLES π₯
FIXME
(i know. i know. the docs said FIXME and we're all just living with it π)
π SEE ALSO π
ok and before you go β if you're ever passingNULLforerrorand then wondering why debugging is hard, that's on you bestie, the page literally warned you π
RoarAudio π May 2011 β yeah this page is a lil vintage, she's been serving roar_vs_close(3) realness since way back. periodt. π
β¨
π¦ 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