roar_error(3)

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

πŸ’– roar_error(3) β€” the RoarAudio error code, bestie πŸ’–

okay so this is a page from the RoarAudio Programmer's Manual, and it's about one lil variable that carries so much drama: your current RoarAudio error value. let's get into it 🫢


✨ NAME ✨

roar_error β€” the RoarAudio error code πŸ‘‘


🌸 SYNOPSIS 🌸

#include <roaraudio.h>

that's it. that's the whole vibe check. include the header and you're in πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so roar_error is a variable or a macro that expands to a read-write able variable, and what it stores is the current RoarAudio error value. the data type of this variable-or-macro is int. periodt.

when the host environment supports it, this is thread local. so like, your thread's error is your thread's error. main character energy, no sharing required ✨

here's the tea tho πŸ“: all function calls inside libroar are allowed to set this value. (exceptions get noted, either right here or in the docs for the individual functions.) some of them will also clear it, in the case where there's no error at all. and it's not just libroar β€” applications and other librarys may also alter the value.

so what does that mean for you, bestie? it means if you still need that error value after calling other functions, you have to save it yourself before making those calls. it's giving "hold my hand or i'll lose it" 😭 the value does not wait for you, ngl.


πŸ’€ EXCEPTIONS πŸ’€

these functions will not alter this value. iconic behaviour, honestly:

  • ROAR_DBG(3)
  • ROAR_WARN(3)
  • ROAR_ERR(3)
  • ROAR_INFO(3)

plus these three:

  • roar_err_store(3)
  • roar_err_restore(3)
  • roar_err_convert(3)

πŸŽ€ EXAMPLES πŸŽ€

FIXME

yeah. FIXME. that's the whole examples section. not me reading that and just πŸ’€ β€” the docs said "we'll do it later" and never did. we love an unfinished slay.


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the page!! tysm for reading, bestie β€” check your errors, save your values, stay thread local πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

this masterpiece came to you courtesy of RoarAudio, dated July 2012. yeah, 2012. vintage. lowkey a relic and highkey still running your audio. iykyk πŸ“πŸ§šπŸ’œ

πŸ“¦ where this page comes from