roar_vs_role(3)
π roar_vs_role(3) β the RoarAudio Programmer's Manual, but make it cute
okay bestie, so this is a page from the RoarAudio Programmer's Manual, and today's main character is roar_vs_role(3). yes the manual section is literally (3), that's the "library functions" section, iykyk π
β¨ NAME β¨
roar_vs_role β Update role for a stream
likeβ¦ you're telling the stream what it is. its vibe. its role. π¦
πΈ SYNOPSIS πΈ
#include <roaraudio.h>
int roar_vs_role (roar_vs_t * vss, int role, int * error);
that's the whole signature, no cap. copy it exactly, don't freestyle the types π
π DESCRIPTION π
This function updates the role of the stream. That's the whole job. That's the assignment and she ATE. π₯
So when should you call it? The manual says you should do this before any read or write operation, okay? before. like, get your life together before you start touching the stream, bestie.
but also β and this is the slay part β it can be used at any time to update the meta data. so it's not a one-and-done thing, you can come back and change the role whenever. main character energy, she's flexible π
π PARAMETERS π
vssβ the VS object to be updated. this is the thing getting the glow-up.roleβ the new role of the stream. the new identity. the new era. β¨errorβ this is a pointer to a integer used to store the error value in case of error. yes, "a integer", we're quoting the original grammar and moving on π«Ά. This can beNULLif not used, but it is very recommended to use this error value to report good error messages to the user. like, pls. your users deserve nice error messages. don't leave them on read π
β RETURN VALUE β
- On success these calls return
0. π - On error,
-1is returned. π
that's it, that's the whole vibe check.
π EXAMPLES π
here's the example, verbatim, exactly as the manual gives it:
struct roar_keyval kv[2] = {
{.key = "TITLE", .value = "Some title"},
{.key = "ARTIST", .value = "Some artist"}
};
ret = roar_vs_meta(vss, &kv, 2, &err);
not me noticing the example callsroar_vs_metaand notroar_vs_roleπ β that's literally what the manual shows tho, so we're keeping it exactly as-is. no edits, no fixing, we don't do that here. π
π SEE ALSO π
go read these next, bestie, they're all part of the same friend group:
and that's the page!! source is RoarAudio, dated May 2011, and the page itself is roar_vs_role(3). mwah, go update some roles, you've got this π§β¨
π¦ 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