ROAR_SIMPLE_NEW_STREAM_OBJ(3)

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

πŸ’– roar_simple_new_stream β€” bestie we're opening a stream πŸ’–

okay so this is from the System Manager's Manual: RoarAudio section of the manual, and honestly? it's giving vintage. let's get into it πŸŽ€


✨ NAME ✨

roar_simple_new_stream, roar_simple_new_stream_obj β€” create a new stream via RoarAudio πŸ¦‹


🌸 SYNOPSIS 🌸

#include <roaraudio.h>

int roar_simple_new_stream(struct roar_connection * con, int rate, int
channels, int bits, int codec, int dir);

int roar_simple_new_stream_obj(struct roar_connection * con, struct
roar_stream * s, int rate, int channels, int bits, int codec, int dir);

like. look at those signatures. two whole functions. we love to see it πŸ’…


πŸ‘‘ DESCRIPTION πŸ‘‘

So what this does is it opens a new stream to the sound server as an independent file handle β€” and no, bestie, not an execed one. that distinction is the whole point fr fr.

Why would you want that? because sometimes you still wanna mess with some meta data, or have the volume get updated after the stream is already open. and with this? you can. iconic behavior honestly πŸ”₯

⚠️ but here's the tea: these functions are marked obsolete and will be removed in later releases. not me warning you like this but. yeah. please upgrade to VS API. go look at roar_vs_new_simple(3). do it for me πŸ₯Ί

πŸ’œ PARAMETERS πŸ’œ

  • con β€” the "parent" connection, bestie. it's a valid open control connection, the kind you get from roar_simple_connect(3). no random connections allowed βœ‹
  • s β€” the stream object that gets updated to correspond to the new stream. this is the one you want if you're planning to update some meta data after the stream has been opened, because you can throw all the control commands at this object. main character energy honestly πŸ‘‘
  • rate, channels, bits, codec β€” for the explanation on these cuties, go read roar_simple_play(3). i'm not repeating myself, it's all there πŸ“
  • dir β€” and for this one, go read roar_simple_stream(3). same deal πŸ’«

⭐ RETURN VALUE ⭐

  • on success these calls return a new filehandle πŸŽ‰
  • on error, -1 is returned. and like. we don't love that but it is what it is πŸ’€

🌈 EXAMPLES 🌈

if you want to see roar_simple_new_stream_obj() in its natural habitat, there's an example of its use in the roarvorbis(1) code. go peek πŸ‘€


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, bestie!! this one came from RoarAudio, dated May 2011 β€” yeah she's an elder but she still slays πŸ’–βœ¨ mwah, go use the VS API tho fr fr πŸŽ€

πŸ“¦ where this page comes from