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

# AuConvertDataToShort(3nas)

convert audio data from the specified format to signed short integer.

## Name

**AuConvertDataToShort** - convert audio data from the specified format to signed short integer.

## Synopsis

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

int **AuConvertDataToShort**(*format*, *num\_bytes*, *data*)\
\
     int *format*;\
\
     int *num\_bytes*;\
\
     **AuPointer** *data*;

## Arguments

- *format*

  Specifies the format of the data. Currently, the following data formats are defined: **AuFormatULAW8**, **AuFormatLinearUnsigned8**, **AuFormatLinearSigned8**, **AuFormatLinearSigned16MSB**, **AuFormatLinearUnsigned16MSB**, **AuFormatSignedLinear16LSB**, and **AuFormatLinearUnsigned16LSB**.

- *num\_bytes*

  Specifies the number of bytes of data.

- *data*

  Specifies the data to convert.

## Description

**AuConvertDataToShort** converts *num\_bytes* of *data* from *format* to signed short integer, returning 0 if successful, or -1 if *format* isn't valid.

## See Also

**AuConvertShortToData**.

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