AuScanForTypedEvent(3)
π AuScanForTypedEvent β bestie's guide to snagging the first event of a specific type π
okay so this one lives in the audiolib manual (the Network Audio System C Language Interface crew π§) and it's genuinely such a useful little function. it's giving "I don't want any event, I want that event" energy. periodt.
β¨ Name β¨
AuScanForTypedEvent β return the first event of a specific type π―
π¦ Synopsis π¦
#include <audio/audiolib.h>
AuBool AuScanForTypedEvent(server, mode, dequeue, type, event)
AuServer *server;
int mode;
AuBool dequeue;
int type;
AuEvent *event; /* RETURN */
like yes she returns an AuBool and yes she takes five whole arguments, she's that girl π
πΈ Arguments πΈ
serverβ the connection to the audio server. your link to the whole situation π«Άmodeβ how far to look for a match, like how deep you're willing to dig through the group chat. this should be one of these constants:AuEventsQueuedAlready,AuEventsQueuedAfterReading, orAuEventsQueuedAfterFlushπdequeueβ if a matching event is found, should it be removed from the queue? literally just "do you want to keep it or yeet it" β¨typeβ the type of event to match. the type should be one of these constants:AuEventTypeElementNotify,AuEventTypeGrabNotify, orAuEventTypeMonitorNotifyπ₯eventβ returns the matching event if found. the main character of the whole operation π
π Description π
AuScanForTypedEvent scans the event queue looking for the first event that matches type. she's on a mission and she will not be distracted, no cap.
if mode is AuEventsQueuedAlready, AuScanForTypedEvent only checks for events already in the queue. like, it's not getting up off the couch for this one, it only looks at what's already in the room π
if mode is AuEventsQueuedAfterReading, and a matching event isn't found already in the queue, AuScanForTypedEvent attempts to read more events out of the application's connection. okay so now she's actually going to go check the mail π¬
if mode is AuEventsQueuedAfterFlush and a matching event isn't already in the queue or isn't waiting to be read, AuScanForTypedEvent flushes the output queue and attempts to read more events out of the application's connection. full send. she flushes, she reads, she does the absolute most and honestly? iconic π
if dequeue is AuTrue, and a matching event is found, it is removed from the queue. so like, take it, it's yours, it's gone now β¨
π See Also π
AuEventsQueuedAuScanEventsAuNextEventaudiolibβ Network Audio System C Language Interface
ngl bestie, this is the "find the one specific event" function and the mode argument is basically your "how hard should I try" dial. choose wisely π
mwah π that's a wrap from the <b>audiolib β event handling</b> girlies, version <b>1.9.5</b>, and this page is literally <b>AuScanForTypedEvent(3)</b>. go forth and scan, queen π
π¦ where this page comes from
- fedora 43: nas-devel 1.9.5-11.fc41 Β· MIT
- fedora 43: nas-devel 1.9.5-11.fc41 Β· MIT
- fedora 43: nas-devel 1.9.5-14.fc43 Β· MIT
- fedora 43: nas-devel 1.9.5-14.fc43 Β· MIT
- fedora 44: nas-devel 1.9.5-15.fc44 Β· MIT
- fedora 44: nas-devel 1.9.5-15.fc44 Β· MIT
- 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