---
name: "AuElementNotifyEvent"
section: "3nas"
platform: "linux"
package: "libaudio-dev"
version: "1.9.4-9"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/AuElementNotifyEvent"
---

# AuElementNotifyEvent(3nas)

element notify event structure

## Name

**AuElementNotifyEvent** - element notify event structure

## Structures

\#include \<audio/audiolib.h\>

typedef union \_AuEvent\
 {\
\
     . . .\
\
     **AuElementNotifyEvent** *auelementnotify*;\
\
     . . .\
 }**AuEvent**;

typedef struct \_AuElementNotifyEvent\
 {\
\
     int *type*;\
\
     **AuUint32** *serial*;\
\
     **AuBool** *send\_event*;\
\
     **AuServer** \**server*;\
\
     **AuTime** *time*;\
\
     **AuFlowID** *flow*;\
\
     unsigned char *element\_num*;\
\
     unsigned char *kind*;\
\
     unsigned char *prev\_state*;\
\
     unsigned char *cur\_state*;\
\
     unsigned char *reason*;\
\
     **AuUint32** *num\_bytes*;\
 }**AuElementNotifyEvent**;

## Members

- *type*

  The event type. ElementNotify events are type **AuEventTypeElementNotify**.

- *serial*

  The serial ID of the event expanded from the 16 bit value sent by the server.

- *send\_event*

  **AuTrue** if the event came from a **SendEvent** protocol request.

- *server*

  The connection to the audio server that the event was read from.

- *time*

  The server time in milliseconds when the event was generated.

- *flow*

  The ID of the flow that caused the event.

- *element\_num*

  The index of the element that caused the event or **AuElementAll** to indicate the flow.

- *kind*

  The kind of notify event. This will be one of these constants: **AuElementNotifyKindLowWater**, **AuElementNotifyKindHighWater**, or **AuElementNotifyKindState**.

- *prev\_state*

  The previous state of the element indexed by *element\_num*. This will be one of these constants: **AuStateStop**, **AuStateStart**, or **AuStatePause**.

- *cur\_state*

  The current state of the element indexed by *element\_num*. This will be one of these constants: **AuStateStop**, **AuStateStart**, or **AuStatePause**.

- *reason*

  The reason for the notify event. This will be one of these constants: **AuReasonUser**, **AuReasonUnderrun**, **AuReasonOverrun**, **AuReasonEOF**, **AuReasonWatermark**, or **AuReasonHardware**.

- *num\_bytes*

  The number of bytes to send or receive. Only valid if the the element indexed by *element\_num* is an ImportClient or ExportClient.

## Description

ElementNotify events are sent to client applications to notify them of a watermark condition or state change. If *kind* is **AuElementNotifyKindLowWater**, the ImportClient element indexed by *element\_num* in *flow* is ready to receive *num\_bytes* of audio data from the client application. If *kind* is **AuElementNotifyKindHighWater**, the ExportClient element indexed by *element\_num* in *flow* is ready to send *num\_bytes* of audio data to the client application. If *kind* is **AuElementNotifyKindState**, the element indexed by *element\_num* (or flow if *element\_num* is **AuElementAll**) has made a state transition from *prev\_state* to *cur\_state* triggering the event. Reguardless of *kind*, *prev\_state* and *cur\_state* contain the old and new states and *reason* contains the reason for the event.

## See Also

**AuAnyEvent**, **AuErrorEvent**, **AuGrabNotifyEvent**, **AuMakeSendNotifyAction**, **AuMonitorNotifyEvent**.

audiolib - **Network Audio System** C Language Interface
