AuMonitorNotifyEvent(3)

πŸ’– AuMonitorNotifyEvent β€” the manual page, but make it cute πŸ’–

okay bestie, welcome to AuMonitorNotifyEvent(3) from the Library Functions Manual β€” yes we're reading manpages together now, that's just the vibe we're on πŸ’… this one's all about the monitor notify event structure, and it's genuinely not that deep, so let's go ✨


🌸 Name 🌸

AuMonitorNotifyEvent β€” the monitor notify event structure πŸŽ€


πŸ¦‹ Structures πŸ¦‹

first up, the include, because nothing happens without the include, periodt:

#include <audio/audiolib.h>

so there's this big union called AuEvent, and AuMonitorNotifyEvent is one of the things chillin' inside it πŸ‘‘:

typedef union _AuEvent
{
    . . .
    AuMonitorNotifyEvent aumonitornotify;
    . . .
}AuEvent;

and here's the actual struct, in all its glory, no cap:

typedef struct _AuMonitorNotifyEvent
{
    int type;
    AuUint32 serial;
    AuBool send_event;
    AuServer *server;
    AuTime time;
    AuFlowID flow;
    unsigned char element_num;
    unsigned char format;
    unsigned char num_tracks;
    unsigned short count;
    unsigned short num_fields;
    AuUint32 data;
    AuUint32 data1;
    AuUint32 data2;
}AuMonitorNotifyEvent;

✨ Members ✨

okay this is the part where we meet the whole squad, one member at a time 🫢

  • type β€” the event type. MonitorNotify events are type AuEventTypeMonitorNotify.
  • serial β€” the serial ID of the event, expanded from the 16 bit value the server sent over.
  • send_event β€” AuTrue if this event came from a SendEvent protocol request. it's giving "did someone send this on purpose" πŸ’€
  • server β€” the connection to the audio server that this event was read from.
  • time β€” the server time in milliseconds for when the event was generated ⏰
  • flow β€” the ID of the flow that caused the event.
  • element_num β€” the index of the ExportMonitor element that generated this event.
  • format β€” the format of the monitor data. currently these formats are defined: AuFormatULAW8, AuFormatLinearUnsigned8, AuFormatLinearSigned8, AuFormatLinearSigned16MSB, AuFormatLinearUnsigned16MSB, AuFormatSignedLinear16LSB, and AuFormatLinearUnsigned16LSB. this one's taken from the ExportMonitor element 🌈
  • num_tracks β€” how many tracks are in the monitor data. also taken from the ExportMonitor element.
  • count β€” always 0. iconic consistency honestly.
  • num_fields β€” always 2.
  • data β€” monitor data.
  • data1 β€” monitor data.
  • data2 β€” monitor data.
ngl data, data1 and data2 really said "three names, same job" and we respect the minimalism πŸ’œ

πŸ’€ Description πŸ’€

MonitorNotify events get sent to clients that have flows containing ExportMonitor elements. that's it, that's the whole plot bestie πŸŽ€


πŸ”₯ See Also πŸ”₯

go read these next, they're the rest of the friend group:

  • AuAnyEvent
  • AuElementNotifyEvent
  • AuErrorEvent
  • AuGrabNotifyEvent

and of course: audiolib β€” Network Audio System C Language Interface 🌟


that's the whole page!! you ate that fr fr 🫢 this was audiolib - events, version 1.9.4, and yeah it's AuMonitorNotifyEvent(3) β€” now go forth and monitor those notifications, main character πŸ’…βœ¨

πŸ“¦ where this page comes from