roar_vs_c...ction_obj(3)
β¨ NAME β¨
roar_vs_connection_obj, roar_vs_stream_obj, roar_vs_vio_obj β bestie, this is the VS API interface for use of main API π
okay so real talk, this lives in the RoarAudio Programmer's Manual (section 3, roar_vs_c...ction_obj(3), iykyk) and it's literally your backstage pass to the main API. let's go π
πΈ SYNOPSIS πΈ
#include <roaroaudio.h>
wait no, let me not do you dirty like that. the actual include is:
#include <roaraudio.h>
struct roar_connection * roar_vs_connection_obj(roar_vs_t * vss, int *
error);
struct roar_stream * roar_vs_stream_obj (roar_vs_t * vss, int *
error);
struct roar_vio_calls * roar_vs_vio_obj (roar_vs_t * vss, int *
error);
three little functions, three little glow-ups. obsessed π
π« DESCRIPTION π«
so. those functions return the internal connection, stream and VIO object of the VS object. that's the whole vibe. they exist so you can use the main API with a VS opened stream β like, the VS thing is holding the door open and you just walk through πͺβ¨
roar_vs_connection_obj()β hands you the connection object used for the control connection to the server. that's the little chit-chat line where you and the server gossip.roar_vs_stream_obj()β hands you the stream object storing information about the stream. it's the receipts πroar_vs_vio_obj()β hands you the VIO object used to read data from or send data to the server. the actual audio-carrying bestie π¦
β οΈ okay important, listen up: returned objects are freed as soon as the VS object is closed. gone. no cap. so don't be out here holding pointers to ghosts π»
and here's the lil exception that makes it all make sense: if the VS object was created using roar_vs_new_from_con(3), then the connection is not closed by the VS object, and it stays valid after close until it is closed by the program or library. so you own that one, bestie. main character responsibility π
π¨ THE BIG ONE: the VIO object MUST NOT be used while in buffered mode. like, do not. it's giving chaos. it's giving undefined. just don't π
π PARAMETERS π
vssβ the VS object to return internal objects from. your main squeeze πerrorβ this is a pointer to an integer used to store the error value in case of error. this can beNULLif not used, but it is very recommended to use this error value to report good error messages to the user. fr fr, future-you will thank present-you π
β RETURN VALUE β
- on success, these calls return the described object. slay β¨
- on error,
NULLis returned. and likeβ¦ check that. please. π
π EXAMPLES π
FIXME
(yeah bestie, that's literally what the page says. the examples section is a work in progress. iconic of it honestly π)
π SEE ALSO π
roarvs(7), libroar(7), RoarAudio(7).
go read those too, they're the supporting cast π«Ά
mwah π that's the whole page β written by the RoarAudio girlies, dated May 2011, and yes she's still that girl.
π¦ 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