AuConvertShortToData(3)
π AuConvertShortToData(3) π
okay so bestie, welcome to the Library Functions Manual β this is the AuConvertShortToData page and it's lowkey a lil legend. it lives in audio/audiolib.h, it's giving audio-girlie energy, and it does exactly one thing but it does it flawlessly. let's get into it π
β¨ NAME β¨
AuConvertShortToData β converts signed short integers to the specified format. that's it. that's the whole job. no cap. π¦
πΈ SYNOPSIS πΈ
#include <audio/audiolib.h>
int AuConvertShortToData(format, num_bytes, data)
int format;
int num_bytes;
AuPointer data;
she's a classic. takes three args, returns an int, doesn't overcomplicate. main character energy fr π
π§ ARGUMENTS π§
formatβ the format you wanna convert to. currently, the following data formats are defined:AuFormatULAW8,AuFormatLinearUnsigned8,AuFormatLinearSigned8,AuFormatLinearSigned16MSB,AuFormatLinearUnsigned16MSB,AuFormatSignedLinear16LSB, andAuFormatLinearUnsigned16LSB. yes bestie, that's the whole list, and you gotta pick from it πnum_bytesβ the number of bytes of data. literally just how much data we're working with, count them bytes, don't skip any πdataβ the data to convert. hand it over, she'll handle it π«Ά
π« DESCRIPTION π«
okay so here's the tea: AuConvertShortToData converts num_bytes of data from signed short integer to format. that's the vibe. she's a converter, she's focused, she's not doing side quests.
and the return value? iconic and simple:
- returns
0if successful π - returns
-1ifformatisn't valid π
that's right, if you hand her a bogus format she's not gonna pretend, she's just gonna say -1 and move on. respect. periodt.
ngl, always check that return value β a sneaky-1means yourformatwas a no-go, and your data did not get converted the way you hoped π
π₯ SEE ALSO π₯
AuConvertDataToShortβ the reverse queen, she does the opposite thing πaudiolibβ Network Audio System C Language Interface. the whole squad, the whole ecosystem, the whole vibe π
and that's the page!! slay β¨ this lil manual comes to you courtesy of audioutil, version 1.9.4 β go forth, convert your shorts, and stay hydrated bestie πππ¦
π¦ where this page comes from
- debian bookworm: libaudio-dev 1.9.4-7
- debian trixie: libaudio-dev 1.9.4-9
- ubuntu jammy: libaudio-dev 1.9.4-7build1
- ubuntu noble: libaudio-dev 1.9.4-8
- ubuntu questing: libaudio-dev 1.9.4-9
- ubuntu resolute: libaudio-dev 1.9.4-9.2
- ubuntu stonking: libaudio-dev 1.9.4-9.2
- copyright 1994 Steven King
- Copyright 1993 Network Computing Devices, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms