roar_error2str(3)
π roar_error2str β the RoarAudio programmer's manual, bestie edition π
okay so you're deep in libroar territory and you've got an error code just... sitting there. being a number. rude. this little icon of a function is here to fix that π¦
β¨ NAME β¨
roar_error2str β turn an error code into a lion-readable string π¦
β¨ SYNOPSIS β¨
#include <roaraudio.h>
const char * roar_error2str(const int error);
β¨ DESCRIPTION β¨
so basically: you hand this function an error code, and it hands you back a lion readable error message for that code. that's it. that's the whole job. main character behavior honestly π
but listen β if the error code is unknown or invalid, it returns NULL. and that is not the same vibe as roar_vs_strerr(3), which instead gives you back a string that represents an unknown error. so like, two different coping mechanisms. know the difference, iykyk.
the string it returns (if it's not NULL) is constant read-only memory β so do not alter it and do not free it. hands off. it's not yours. π«Ά
also it's thread safe, so you can call it from wherever, no cap. π
β¨ PARAMETERS β¨
errorβ the error code that should be translated into a string. the number that needs a glow-up. β¨
β¨ RETURN VALUE β¨
returns a constant string describing the error error, or NULL on error. yes, an error function that can itself error out. it's giving recursion energy, it's giving irony, we love it π
β¨ EXAMPLES β¨
FIXME
not me putting FIXME in the examples section π the docs said "figure it out bestie" and honestly? valid.
β¨ SEE ALSO β¨
and that's the whole page, bestie π this one's from RoarAudio, dated July 2012 β yes she's an elder but she's still serving, periodt. go forth and translate your error codes, you absolute legend ππβ
π¦ 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