muroar_stream(3)

πŸ“¦ version 0.1.13, in ubuntu jammy

✨ muroar_stream β€” the muRoar Programmer's Manual glow-up ✨

okay bestie, sit down, we're learning muroar_stream(3) from the muRoar Programmer's Manual and honestly? it's giving one-way ticket to stream town. πŸŽ€


🌸 NAME 🌸

muroar_stream β€” Create a stream connected to a RoarAudio sound server πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <muroar.h>

muroar_t muroar_stream (muroar_t fh, int dir, int * stream, int codec,
int rate, int channels, int bits);

πŸ’… DESCRIPTION πŸ’…

so basically this function connects a stream to a sound server that supports the RoarAudio protocol. it takes a connected control connection β€” one you already made with roar_connect(3) β€” and converts it into a connected stream. glow-up complete. πŸ‘‘

but bestie, hear me: after this, the socket can no longer be used as control connection. it's a stream now. it said "new me, who dis". no takebacks. πŸ’€


πŸŽ€ PARAMETERS πŸŽ€

  • fh β€” the connected control connection. your original, pre-glow-up socket.
  • dir β€” the stream direction for the new stream. for playback of a waveform stream (PCM data) this is MUROAR_PLAY_WAVE. for all possible values see the official muRoar manual. πŸ“–
  • stream β€” a pointer to an integer where muRoar stores the stream ID. if your application does not need to know the stream ID of the new stream this can be set to NULL. no thoughts, head empty, pass NULL. πŸ™ˆ
  • codec β€” the codec to be used for the new stream. for signed PCM in host byte order use MUROAR_CODEC_PCM or MUROAR_CODEC_PCM_S. for unsigned PCM use MUROAR_CODEC_PCM_U. there are a lot other codecs defined. however, using a codec not supported by the server will result an failure of this call. 😭 for all possible values see the official muRoar manual.
  • rate β€” the sample/frame rate the new stream will use. for streams this setting does not make any sense, set this to zero. ✨
  • channels β€” the number of channels for the new stream. for streams this setting does not make any sense, set this to zero. ✨
  • bits β€” the number of bits per sample to be used by the data. for streams this setting does not make any sense, set this to zero. ✨
lowkey noticing a theme? rate, channels, bits? all zero. they're not the main characters here, the stream is. πŸ’…

🌈 RETURN VALUE 🌈

on success this call return the new stream IO handle. πŸ₯³ this may be the same as the control connection or a new one, and the control connection is closed. on error, MUROAR_HANDLE_INVALID is returned. πŸ’”


πŸ’€ BUGS πŸ’€

in failure where is no way to tell was was going wrong.

yes bestie, that's the whole bug report. it is what it is. 😭 the error gives you nothing. no explanation, no context, just vibes and silence.

🧚 HISTORY 🧚

this function first appeared in muRoar version 0.1beta0. a legend from day one, fr fr. πŸ‘‘


⭐ SEE ALSO ⭐


and that's the whole page, bestie β€” stream created, control connection gone, rate/channels/bits all zeroed out like a true minimalist. 🫢

muRoar Β· April 2012 Β· mwah, love u, go read muroar_connect(3) next πŸ’–βœ¨

πŸ“¦ where this page comes from