roar_simple_play(3)
π roar_simple_play(3) β the System Manager's Manual: RoarAudio edition π
okay bestie, gather round, we're doing the RoarAudio simple-stream girlies today. this is roar_simple_play(3) from the RoarAudio manual, and yes she's a little vintage, but she ATE back in the day. let's get into it π
β¨ NAME β¨
roar_simple_play, roar_simple_monitor, roar_simple_record, roar_simple_filter β simple playback, monitoring, recording or filtering via RoarAudio π
(and yes, the original page says "monetoring" but we all know what she meant, love her for it π«Ά)
πΈ SYNOPSIS πΈ
#include <roaraudio.h>
int roar_simple_play(int rate, int channels, int bits, int codec, char * server, char * name);
int roar_simple_monitor(int rate, int channels, int bits, int codec, char * server, char * name);
int roar_simple_record(int rate, int channels, int bits, int codec, char * server, char * name);
int roar_simple_filter(int rate, int channels, int bits, int codec, char * server, char * name);
four little functions, one shared vibe. no cap. β¨
π¦ DESCRIPTION π¦
so what she does is: she opens a connection to the roard(1) and creates a brand new stream for playback, monitoring, recording or filtering. that's the whole job. simple, iconic, does exactly what it says on the tin π
when you're done with the stream you need to close the connection with roar_simple_close(3). like, you need to. it's not optional, bestie.
and if you just... do nothing with the stream? yeah, the server will kick your connection. brutal. and in the case of playback, it'll warn the user about underruns. so don't ghost your stream, she will notice π
β οΈ BIG IMPORTANT ONE: these functions were removed in version 1.0beta0-pr0. they're gone, girl. please upgrade to the VS API β go look at roar_vs_new_simple(3). this is not a drill π
π PARAMETERS π
rateβ the sample rate of the stream. like, how many samples per second, the tempo of your little audio moment π΅channelsβ the number of channels in the stream. (the original spells it "nummber", and honestly? iconic typo, but it's the channel count bestie.)bitsβ the number of bits per sample of the stream. the common values are8and16.codecβ the codec of the data you stream to the server. and hear me on this one: this has nothing to do with the codec of the file you're playing back or encoding. completely different thing. the default (ROAR_CODEC_DEFAULT) isROAR_CODEC_PCM_S_BE, which is signed PCM in big endian. periodt β¨serverβ the name of the server. a value ofNULL(the common case, fr fr) is used to try the default locations.nameβ the name of the process opening this stream, so it gets listed in the server's meta data. should normally be the name of the player β no path, no filename of the thing being played, just the name. if it'sNULL, an internal default gets used. π
π§ NOTES ON FILTER STREAMS π§
filtering streams should not be expected to work with different audio data than whatever the server itself is working with. so before you open the stream, get the values via roar_server_oinfo(3). check first, open second, that's the rule π
β RETURN VALUE β
- on success, these calls return a filehandle for the stream π«Ά
- on error,
-1is returned. sadness. π
π₯ EXAMPLES π₯
examples of these calls are the tools roarcat(1), roarmon(1), roarrec(1) and roarfilt(1). just go look at their code (the original says "there code", we love her). they aren't that complex β genuinely, go peek, it's giving readable π
π SEE ALSO π
roar_vs_new_simple(3), roarcat(1), roarmon(1), roarrec(1), roarfilt(1), roar_server_oinfo(3), roar_simple_close(3), libroar(7), RoarAudio(7).
and that's the page bestie!! π this one's from the RoarAudio crew, manual page dated July 2012 β a whole era, truly. if you're out here calling these functions in the year of our lord, please upgrade to the VS API, i am literally begging ππ
mwah, go close your connections π β¨
π¦ 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