AuScanEvents(3)
β¨ AuScanEvents β¨
okay so bestie, this one's from the audiolib girlies β the Library Functions Manual β and it's literally just: gimme the first event that matches my vibe check. that's it. that's the function. π
πΈ NAME πΈ
AuScanEvents β returns the first event that satisfies the predicate. no cap, that's the whole job description. π₯
π SYNOPSIS π
#include <audio/audiolib.h>
AuBool AuScanEvents(server, mode, dequeue, predicate, arg, event)
AuServer *server;
int mode;
AuBool dequeue;
AuBool (*predicate)(AuServer *,AuEvent *, AuPointer);
AuPointer arg;
AuEvent *event; /* RETURN */
π¦ ARGUMENTS π¦
serverβ the connection to the audio server. your link to the whole situation, your main character's phone line fr. πmodeβ how far you're willing to go looking for a match. must be one of these constants:AuEventsQueuedAlready,AuEventsQueuedAfterReading, orAuEventsQueuedAfterFlush. pick your level of effort, queen. πdequeueβ if a matching event gets found, do we remove it from the queue? yes or no, decide your boundaries. π«Άpredicateβ the procedure that gets called to figure out if an event actually matches the criteria. this is your little judge, your vibe-checker, your "is this for me" oracle. β¨argβ any extra arguments you wanna pass along to thatpredicateprocedure. lil gift basket for the judge. πeventβ returns the matching event, if one was found. the moment of truth. π
π DESCRIPTION π
so AuScanEvents scans the event queue looking for the first event that satisfies the caller-supplied predicate. it's giving "scroll until you find the one". π
- If
modeisAuEventsQueuedAlready,AuScanEventsonly checks for events already in the queue. it's not getting up off the couch for you, bestie. π - If
modeisAuEventsQueuedAfterReading, and a matching event isn't found already in the queue,AuScanEventsattempts to read more events out of the application's connection. okay so now it's putting in a little effort. π§ - If
modeisAuEventsQueuedAfterFlushand a matching event isn't already in the queue or isn't waiting to be read,AuScanEventsflushes the output queue and attempts to read more events out of the application's connection. full send. highkey committed. π₯
If dequeue is AuTrue, and a matching event is found, it is removed from the queue. bye boo, you're coming with me. π
The predicate procedure is called with the arguments server, event, and arg β and it should return AuTrue to indicate a match. return AuTrue = "yes this one, this is the one", periodt. β
π SEE ALSO π
AuEventsQueuedAuScanForTypedEventAuNextEventaudiolibβ Network Audio System C Language Interface
real talk: this is youraudiolibevent handling content, version1.9.5, brought to you by theAuScanEvents(3)section of the manual. go scan some events, you absolute icon. πβ¨ππ¦πΈ
π¦ 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