roar_vs_new(3)

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

πŸ’– roar_vs_new(3) β€” RoarAudio Programmer's Manual πŸ’–

okay bestie, welcome to the roar_vs_new(3) page, aka where we make shiny new VS objects. no data connection yet, we're just setting up the whole vibe first. it's giving prep era. πŸŽ€


✨ NAME ✨

roar_vs_stream, roar_vs_new_from_con β€” create new VS objects. that's it, that's the job. πŸ’…


🌸 SYNOPSIS 🌸

#include <roaraudio.h>

roar_vs_t * roar_vs_new(const char * server, const char * name, int * error);

roar_vs_t * roar_vs_new_from_con(struct roar_connection * con, int * error);

πŸ¦‹ DESCRIPTION πŸ¦‹

so these calls make brand new VS objects without a data connection that's already connected. lowkey niche, highkey useful β€” they're only the move when you wanna share a control connection between multiple streams (which is, like, generally recommended if you're running multiple streams to the same server, no cap) or when you need to poke at some extended parts of the VS API. if you just want the easy road to opening a stream, go look at roar_vs_new_simple(3) and roar_vs_new_from_file(3) instead. those are the ones for the girlies who want simplicity. ✨

roar_vs_new() opens a new control connection to the server server. and name? that gets used as the application name. simple as.

roar_vs_new_from_con() creates a new VS object from the existing control connection con. reusing, recycling, sustainable queen behavior. ♻️

heads up bestie: VS objects made via roar_vs_new_from_con() will NOT close the control connection on roar_vs_close(3). she does not clean up after herself, that's on you. πŸ’€

πŸŽ€ PARAMETERS πŸŽ€

  • server β€” the server to connect to. NULL for defaults. (letting the system pick is a valid slay.)
  • name β€” the application name. this should be something the user can use to identify the application. it MUST NOT be the application's binary name or the value of argv[0]. seriously. do not do that. it's not the vibe. πŸ™ˆ
  • con β€” the already existing and open control connection to use. it's right there, use it.
  • 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. like, actually tell people what went wrong. communication is key. 🫢

⭐ RETURN VALUE ⭐

on success these calls return a new VS object. on error, NULL is returned. that's the whole tea. πŸ“


πŸ’œ EXAMPLES πŸ’œ

FIXME

not me leaving the examples section empty 😭 the manpage said FIXME and honestly? we respect the honesty. moving on. ✨

🌈 SEE ALSO 🌈


RoarAudio Β· June 2011 Β· roar_vs_new(3)

and that's the whole page, bestie!! πŸ’– this was the roar_vs_new(3) manpage from the RoarAudio crew, stamped June 2011 with the source being RoarAudio. go forth and make your VS objects, and remember: NULL on error, new object on success, and always pass that error pointer. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from