AuMakeChangeStateAction(3)
β¨ AuMakeChangeStateAction β¨
okay bestie, welcome to the Library Functions Manual entry for AuMakeChangeStateAction(3) β the little function that sets up an action for you π
this one's a macro, it's giving "I do one thing and I do it flawlessly", and we're gonna walk through it together π«Ά
πΈ NAME πΈ
AuMakeChangeStateAction β initialize an action, bestie. that's it. that's the job. iconic
π SYNOPSIS π
#include <audio/audiolib.h>
AuMakeChangeStateAction(action, trigger_state, trigger_prev_state,
trigger_reason, flow, element_num, new_state)
AuElementAction action; /* RETURN */
unsigned char trigger_state;
unsigned char trigger_prev_state;
unsigned char trigger_reason;
AuFlowID flow;
unsigned char element_num;
unsigned char new_state;
like. look at that signature. seven whole arguments. she's thriving β¨
π¦ ARGUMENTS π¦
actionβ this one's theRETURN, so she's the output π β she returns the initialized action. you hand her anAuElementActionand she fills her in.trigger_stateβ specifies the state that triggers the action. no vibes-based guessing allowed, it must be one of these constants:AuStateStop,AuStateStart,AuStatePause, orAuStateAny. periodt.trigger_prev_stateβ specifies the previous state for the trigger. again, must be one of:AuStateStop,AuStateStart,AuStatePause, orAuStateAny. the duality of states, we love to see it πtrigger_reasonβ specifies the reason for the action. must be one of these constants:AuReasonUser,AuReasonUnderrun,AuReasonOverrun,AuReasonEOF,AuReasonWatermark,AuReasonHardware, orAuReasonAny. seven options, so many reasons to be dramatic, lowkey obsessed πflowβ specifies the ID of the flow to affect. the flow. the main character. we're affecting her πelement_numβ specifies the index of the element to affect. yes bestie, the index, not the element itself. iykyk.new_stateβ specifies the new state for the flow. and listen, it must be one ofthsesconstants β okay the original literally saysthses, i'm not fixing it, that's a typo and it's now part of the lore π β so:AuStateStop,AuStateStart, orAuStatePause. note there is noAuStateAnyhere. she has to pick a real state, no "any" cop-out. slay.
π DESCRIPTION π
so what does she actually do? AuMakeChangeStateAction sets the action field of action to AuElementActionChangeState β cute, on brand β and then initializes the other fields with the remaining arguments. that's the whole thing. no cap.
π§ heads up bestie: AuMakeChangeStateAction is implemented as a macro. so don't come for her about function pointers, she's not that girl.
π SEE ALSO π
AuMakeSendNotifyActionAuMakeNoopActionaudiolibβ Network Audio System C Language Interface
π« SIGN-OFF π«
and that's the whole page!! this came from the audiolib docs β action initialization, version 1.9.4 β shoutout to everyone who maintains this stuff, you're doing amazing sweetie π
go make some actions, bestie. you got this. πβ¨π¦
π¦ 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