roar_connectionref(3)
π roar_connectionref β the manual page, but make it cute π
okay so bestie, welcome to roar_connectionref(3) from the System Manager's Manual: RoarAudio section 3. this is the lore on how RoarAudio connections keep track of how many people are holding onto them. it's giving β¨ reference counting β¨ and honestly it ate.
πΈ NAME πΈ
roar_connectionref, roar_connectionunref β literally just change the reference counter for RoarAudio connections, that's the whole job π
π¦ SYNOPSIS π¦
#include <roaraudio.h>
int roar_connectionref(struct roar_connection * con);
int roar_connectionunref(struct roar_connection * con);
#define roar_disconnect(x) roar_connectionunref((x))
β¨ DESCRIPTION β¨
so these functions right here? they bump the reference counter on connection objects that you already opened with roar_connect(3), roar_connect_fh(3) or roar_simple_connect(3). like, they're the little tally marks in the corner keeping score of how many things are still using that connection π
and the moment the reference counter hits zero β poof β the connection gets closed and the object gets destroyed. no cap, that's the whole vibe check. 0 = bye bye π
also!! the roar_disconnect(3) macro is provided so your code stays source compatible with RoarAudio 0.4 or older. heads up tho: recompile needed β you can't just swap the binary and hope for the best, bestie. π
π PARAMETERS π
conβ the connection you wanna alter. yes, that one. the one right there. alter it π«Ά
π RETURN VALUE π
- on success? these calls return
0. slay. - on error?
-1comes back at you. not slay. π
π EXAMPLES π
FIXME
(not me telling you the docs themselves said FIXME π iconic behavior honestly, the upstream authors left it as a homework assignment for future generations π§)
β SEE ALSO β
and that's the page!! brought to you by the fine folks at RoarAudio, dated May 2011 β yeah it's vintage, it's retro, it's a classic, we love her π mwah π
π¦ 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