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

# AuWriteElement(3nas)

write data to an ImportClient element in a flow

## Name

**AuWriteElement** - write data to an ImportClient element in a flow

## Synopsis

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

void **AuWriteElement**(*server*, *flow*, *element*, *num\_bytes*, *data*, *end\_of\_data*, *status*)\
\
     **AuServer** \**server*;\
\
     **AuFlowID** *flow*;\
\
     int *element*;\
\
     **AuUint32** *num\_bytes*;\
\
     **AuPointer** *data*;\
\
     **AuBool** *end\_of\_data*;\
\
     **AuStatus** \**status*; /\* **RETURN** \*/

## Arguments

- *server*

  Specifies the connection to the audio server.

- *flow*

  Specifies the ID of the flow.

- *element*

  Specifies the index of the ImportClient element to write the data to.

- *num\_bytes*

  Specifies the number of bytes of audio data to write.

- *data*

  Specifies the buffer to get the audio data from.

- *end\_of\_data*

  Specifies if this is the last write for this import.

- *status*

  If non-NULL, flush the output buffer and return the status from the server.

## Description

**AuWriteElement** transfers audio data from the client application to the server, writing *num\_bytes* from *data* to the ImportClient specified by *element* in the audio flow *flow*. If *end\_of\_data* is **AuTrue**, the ImportClient's eof flag will be set when the write is completed.

## Note

If the flow is "trivial" (consisting only of an ImportClient and an ExportBucket), the *num\_samples* fields in the ImportClient and ExportBucket are ignored and a write past the end of the bucket will result in an **AuBadLength** error.

## Errors

**AuBadFlow**, **AuBadElement**, **AuBadValue**, **AuBadLength**.

## See Also

**AuReadElement**.

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