AuScanEvents - return the first event that satisfies the predicate


#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 */


Specifies the connection to the audio server.
Specifies how far to look for a match. This should be one of these constants: AuEventsQueuedAlready, AuEventsQueuedAfterReading, or AuEventsQueuedAfterFlush.
Specifies if a matching event is found, should it be removed from the queue.
Specifies the procedure that is called to determine if an event matches the criteria.
Specifies any additional arguments to be passed to the predicate procedure.
Returns the matching event if found.


AuScanEvents scans the event queue looking for the first event that satisfies the caller-supplied predicate. If mode is AuEventsQueuedAlready, AuScanEvents only checks for events already in the queue. If mode is AuEventsQueuedAfterReading, and a matching event isn't found already in the queue, AuScanEvents attempts to read more events out of the application's connection. If mode is AuEventsQueuedAfterFlush and a matching event isn't already in the queue or isn't waiting to be read, AuScanEvents flushes the output queue and attempts to read more events out of the application's connection. If dequeue is AuTrue, and a matching event is found, it is removed from the queue. The predicate procedure is called with the arguments server, event, and arg and should return AuTrue to indicate a match.

See Also

AuEventsQueued, AuScanForTypedEvent, AuNextEvent.

audiolib - Network Audio System C Language Interface

Latest Tech News
Your Notes

Sign in/Sign up

Signing in to our system allows you to post your contributions and vote on the contributions of others. It will also allow you to get extra perts like having your favorites in the cloud and having your persistent personal notes wherever you go. More will be added as we scale up our services.

By signing in to our system, you agree our Member Terms and Conditions

with one of the following services

Almost finished!

Please select a screen name for NET SOUP.

 Please send me news and special offers from NET SOUP.

 I have read and accept the Terms of Use.


We have no example yet for this entry

Your Name

Community Contributions and Discussions

Modify your search

View Documentation

Jobs from Indeed