roar_vs_c...ction_obj(3)

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

✨ 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 be NULL if 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, NULL is 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