audio format

## GstAudioFormatInfo

Information for an audio format.

### Members

`format` (GstAudioFormat) –

GstAudioFormat

`name` (const gchar *) –

string representation of the format

`description` (const gchar *) –

user readable description of the format

`flags` (GstAudioFormatFlags) –

GstAudioFormatFlags

`endianness` (gint) –

the endianness

`width` (gint) –

amount of bits used for one sample

`depth` (gint) –

amount of valid bits in width

`silence` (guint8 *) –

width/8 bytes with 1 silent sample

`unpack_format` (GstAudioFormat) –

the format of the unpacked samples

`unpack_func` (GstAudioFormatUnpack) –

function to unpack samples

`pack_func` (GstAudioFormatPack) –

function to pack samples

## GstAudio.AudioFormatInfo

Information for an audio format.

### Members

`format` (GstAudio.AudioFormat) –

GstAudio.AudioFormat

`name` (String) –

string representation of the format

`description` (String) –

user readable description of the format

`flags` (GstAudio.AudioFormatFlags) –

GstAudio.AudioFormatFlags

`endianness` (Number) –

the endianness

`width` (Number) –

amount of bits used for one sample

`depth` (Number) –

amount of valid bits in width

`silence` ([ Number ]) –

width/8 bytes with 1 silent sample

`unpack_format` (GstAudio.AudioFormat) –

the format of the unpacked samples

`unpack_func` (GstAudio.AudioFormatUnpack) –

function to unpack samples

`pack_func` (GstAudio.AudioFormatPack) –

function to pack samples

## GstAudio.AudioFormatInfo

Information for an audio format.

### Members

`format` (GstAudio.AudioFormat) –

GstAudio.AudioFormat

`name` (str) –

string representation of the format

`description` (str) –

user readable description of the format

`flags` (GstAudio.AudioFormatFlags) –

GstAudio.AudioFormatFlags

`endianness` (int) –

the endianness

`width` (int) –

amount of bits used for one sample

`depth` (int) –

amount of valid bits in width

`silence` ([ int ]) –

width/8 bytes with 1 silent sample

`unpack_format` (GstAudio.AudioFormat) –

the format of the unpacked samples

`unpack_func` (GstAudio.AudioFormatUnpack) –

function to unpack samples

`pack_func` (GstAudio.AudioFormatPack) –

function to pack samples

### Methods

#### gst_audio_format_info_fill_silence

    gst_audio_format_info_fill_silence (const GstAudioFormatInfo * info,
                                        gpointer dest,
                                        gsize length)

Fill length bytes in dest with silence samples for info.

Parameters:

`info` –

a GstAudioFormatInfo

`dest` ( [arraylength=length][element-typeguint8]) –

a destination to fill

`length` –

the length to fill

Since : 1.20

#### GstAudio.AudioFormatInfo.prototype.fill_silence

    function GstAudio.AudioFormatInfo.prototype.fill_silence(dest: [ Number ], length: Number): {
        // javascript wrapper for 'gst_audio_format_info_fill_silence'
    }

Fill length bytes in dest with silence samples for info.

Parameters:

`info` (GstAudio.AudioFormatInfo) –

a GstAudio.AudioFormatInfo

`dest` ([ Number ]) –

a destination to fill

`length` (Number) –

the length to fill

Since : 1.20

#### GstAudio.AudioFormatInfo.fill_silence

    def GstAudio.AudioFormatInfo.fill_silence (self, dest, length):
        #python wrapper for 'gst_audio_format_info_fill_silence'

Fill length bytes in dest with silence samples for info.

Parameters:

`info` (GstAudio.AudioFormatInfo) –

a GstAudio.AudioFormatInfo

`dest` ([ int ]) –

a destination to fill

`length` (int) –

the length to fill

Since : 1.20

## Functions

### gst_audio_format_build_integer

    GstAudioFormat
    gst_audio_format_build_integer (gboolean sign,
                                    gint endianness,
                                    gint width,
                                    gint depth)

Construct a GstAudioFormat with given parameters.

Parameters:

`sign` –

signed or unsigned format

`endianness` –

G_LITTLE_ENDIAN or G_BIG_ENDIAN

`width` –

amount of bits used per sample

`depth` –

amount of used bits in width

Returns –

a GstAudioFormat or GST_AUDIO_FORMAT_UNKNOWN when no audio format exists with the given parameters.

### GstAudio.prototype.audio_format_build_integer

    function GstAudio.prototype.audio_format_build_integer(sign: Number, endianness: Number, width: Number, depth: Number): {
        // javascript wrapper for 'gst_audio_format_build_integer'
    }

Construct a GstAudio.AudioFormat with given parameters.

Parameters:

`sign` (Number) –

signed or unsigned format

`endianness` (Number) –

G_LITTLE_ENDIAN or G_BIG_ENDIAN

`width` (Number) –

amount of bits used per sample

`depth` (Number) –

amount of used bits in width

Returns (GstAudio.AudioFormat) –

a GstAudio.AudioFormat or GST_AUDIO_FORMAT_UNKNOWN when no audio format exists with the given parameters.

### GstAudio.audio_format_build_integer

    def GstAudio.audio_format_build_integer (sign, endianness, width, depth):
        #python wrapper for 'gst_audio_format_build_integer'

Construct a GstAudio.AudioFormat with given parameters.

Parameters:

`sign` (bool) –

signed or unsigned format

`endianness` (int) –

G_LITTLE_ENDIAN or G_BIG_ENDIAN

`width` (int) –

amount of bits used per sample

`depth` (int) –

amount of used bits in width

Returns (GstAudio.AudioFormat) –

a GstAudio.AudioFormat or GST_AUDIO_FORMAT_UNKNOWN when no audio format exists with the given parameters.

### gst_audio_format_fill_silence

    gst_audio_format_fill_silence (const GstAudioFormatInfo * info,
                                   gpointer dest,
                                   gsize length)

Fill length bytes in dest with silence samples for info.

Parameters:

`info` –

a GstAudioFormatInfo

`dest` ( [arraylength=length][element-typeguint8]) –

a destination to fill

`length` –

the length to fill

deprecated : 1.20: Use gst_audio_format_info_fill_silence() instead.

### GstAudio.prototype.audio_format_fill_silence

    function GstAudio.prototype.audio_format_fill_silence(info: GstAudio.AudioFormatInfo, dest: [ Number ], length: Number): {
        // javascript wrapper for 'gst_audio_format_fill_silence'
    }

Fill length bytes in dest with silence samples for info.

Parameters:

`info` (GstAudio.AudioFormatInfo) –

a GstAudio.AudioFormatInfo

`dest` ([ Number ]) –

a destination to fill

`length` (Number) –

the length to fill

deprecated : 1.20: Use gst_audio_format_info_fill_silence() instead.

### GstAudio.audio_format_fill_silence

    def GstAudio.audio_format_fill_silence (info, dest, length):
        #python wrapper for 'gst_audio_format_fill_silence'

Fill length bytes in dest with silence samples for info.

Parameters:

`info` (GstAudio.AudioFormatInfo) –

a GstAudio.AudioFormatInfo

`dest` ([ int ]) –

a destination to fill

`length` (int) –

the length to fill

deprecated : 1.20: Use gst_audio_format_info_fill_silence() instead.

### gst_audio_format_from_string

    GstAudioFormat
    gst_audio_format_from_string (const gchar * format)

Convert the format string to its GstAudioFormat.

Parameters:

`format` –

a format string

Returns –

the GstAudioFormat for format or GST_AUDIO_FORMAT_UNKNOWN when the string is not a known format.

### GstAudio.prototype.audio_format_from_string

    function GstAudio.prototype.audio_format_from_string(format: String): {
        // javascript wrapper for 'gst_audio_format_from_string'
    }

Convert the format string to its GstAudio.AudioFormat.

Parameters:

`format` (String) –

a format string

Returns (GstAudio.AudioFormat) –

the GstAudio.AudioFormat for format or GST_AUDIO_FORMAT_UNKNOWN when the string is not a known format.

### GstAudio.audio_format_from_string

    def GstAudio.audio_format_from_string (format):
        #python wrapper for 'gst_audio_format_from_string'

Convert the format string to its GstAudio.AudioFormat.

Parameters:

`format` (str) –

a format string

Returns (GstAudio.AudioFormat) –

the GstAudio.AudioFormat for format or GST_AUDIO_FORMAT_UNKNOWN when the string is not a known format.

### gst_audio_format_get_info

    const GstAudioFormatInfo *
    gst_audio_format_get_info (GstAudioFormat format)

Get the GstAudioFormatInfo for format

Parameters:

`format` –

a GstAudioFormat

Returns –

The GstAudioFormatInfo for format.

### GstAudio.prototype.audio_format_get_info

    function GstAudio.prototype.audio_format_get_info(format: GstAudio.AudioFormat): {
        // javascript wrapper for 'gst_audio_format_get_info'
    }

Get the GstAudio.AudioFormatInfo for format

Parameters:

`format` (GstAudio.AudioFormat) –

a GstAudio.AudioFormat

Returns (GstAudio.AudioFormatInfo) –

The GstAudio.AudioFormatInfo for format.

### GstAudio.audio_format_get_info

    def GstAudio.audio_format_get_info (format):
        #python wrapper for 'gst_audio_format_get_info'

Get the GstAudio.AudioFormatInfo for format

Parameters:

`format` (GstAudio.AudioFormat) –

a GstAudio.AudioFormat

Returns (GstAudio.AudioFormatInfo) –

The GstAudio.AudioFormatInfo for format.

### gst_audio_format_info_get_type

    GType
    gst_audio_format_info_get_type ()

Returns –
No description available

### GstAudio.prototype.audio_format_info_get_type

    function GstAudio.prototype.audio_format_info_get_type(): {
        // javascript wrapper for 'gst_audio_format_info_get_type'
    }

Returns (GObject.Type) –
No description available

### GstAudio.audio_format_info_get_type

    def GstAudio.audio_format_info_get_type ():
        #python wrapper for 'gst_audio_format_info_get_type'

Returns (GObject.Type) –
No description available

### gst_audio_format_to_string

    const gchar *
    gst_audio_format_to_string (GstAudioFormat format)

Parameters:

`format` –
No description available
Returns –
No description available

### GstAudio.prototype.audio_format_to_string

    function GstAudio.prototype.audio_format_to_string(format: GstAudio.AudioFormat): {
        // javascript wrapper for 'gst_audio_format_to_string'
    }

Parameters:

`format` (GstAudio.AudioFormat) –
No description available
Returns (String) –
No description available

### GstAudio.audio_format_to_string

    def GstAudio.audio_format_to_string (format):
        #python wrapper for 'gst_audio_format_to_string'

Parameters:

`format` (GstAudio.AudioFormat) –
No description available
Returns (str) –
No description available

### gst_audio_formats_raw

    const GstAudioFormat *
    gst_audio_formats_raw (guint * len)

Return all the raw audio formats supported by GStreamer.

Parameters:

`len` ( [out]) –

the number of elements in the returned array

Returns ( [transfer: none][arraylength=len]) –

an array of GstAudioFormat

Since : 1.18

### GstAudio.prototype.audio_formats_raw

    function GstAudio.prototype.audio_formats_raw(): {
        // javascript wrapper for 'gst_audio_formats_raw'
    }

Return all the raw audio formats supported by GStreamer.

Returns a tuple made of:

([ GstAudio.AudioFormat ] ) –

an array of GstAudio.AudioFormat

`len` (Number ) –

an array of GstAudio.AudioFormat

Since : 1.18

### GstAudio.audio_formats_raw

    def GstAudio.audio_formats_raw ():
        #python wrapper for 'gst_audio_formats_raw'

Return all the raw audio formats supported by GStreamer.

Returns a tuple made of:

([ GstAudio.AudioFormat ] ) –

an array of GstAudio.AudioFormat

`len` (int ) –

an array of GstAudio.AudioFormat

Since : 1.18

### gst_audio_make_raw_caps

    GstCaps *
    gst_audio_make_raw_caps (const GstAudioFormat * formats,
                             guint len,
                             GstAudioLayout layout)

Return a generic raw audio caps for formats defined in formats. If formats is NULL returns a caps for all the supported raw audio formats, see gst_audio_formats_raw.

Parameters:

`formats` ( [arraylength=len][nullable]) –

an array of raw GstAudioFormat, or NULL

`len` –

the size of formats

`layout` –

the layout of audio samples

Returns ( [transfer: full]) –

an audio GstCaps

Since : 1.18

### GstAudio.prototype.audio_make_raw_caps

    function GstAudio.prototype.audio_make_raw_caps(formats: [ GstAudio.AudioFormat ], len: Number, layout: GstAudio.AudioLayout): {
        // javascript wrapper for 'gst_audio_make_raw_caps'
    }

Return a generic raw audio caps for formats defined in formats. If formats is null returns a caps for all the supported raw audio formats, see GstAudio.prototype.audio_formats_raw.

Parameters:

`formats` ([ GstAudio.AudioFormat ]) –

an array of raw GstAudio.AudioFormat, or null

`len` (Number) –

the size of formats

`layout` (GstAudio.AudioLayout) –

the layout of audio samples

Returns (Gst.Caps) –

an audio GstCaps

Since : 1.18

### GstAudio.audio_make_raw_caps

    def GstAudio.audio_make_raw_caps (formats, len, layout):
        #python wrapper for 'gst_audio_make_raw_caps'

Return a generic raw audio caps for formats defined in formats. If formats is None returns a caps for all the supported raw audio formats, see GstAudio.audio_formats_raw.

Parameters:

`formats` ([ GstAudio.AudioFormat ]) –

an array of raw GstAudio.AudioFormat, or None

`len` (int) –

the size of formats

`layout` (GstAudio.AudioLayout) –

the layout of audio samples

Returns (Gst.Caps) –

an audio GstCaps

Since : 1.18

## Function Macros

### GST_AUDIO_CAPS_MAKE

    #define GST_AUDIO_CAPS_MAKE(format)                                    \
        "audio/x-raw, "                                                    \
        "format = (string) " format ", "                                   \
        "rate = " GST_AUDIO_RATE_RANGE ", "                                \
        "channels = " GST_AUDIO_CHANNELS_RANGE

Generic caps string for audio, for use in pad templates.

Parameters:

`format` –

string format that describes the sample layout, as string (e.g. "S16LE", "S8", etc.)

### GST_AUDIO_FORMAT_INFO_DEPTH

    #define GST_AUDIO_FORMAT_INFO_DEPTH(info)            ((info)->depth)

### GST_AUDIO_FORMAT_INFO_ENDIANNESS

    #define GST_AUDIO_FORMAT_INFO_ENDIANNESS(info)       ((info)->endianness)

### GST_AUDIO_FORMAT_INFO_FLAGS

    #define GST_AUDIO_FORMAT_INFO_FLAGS(info)            ((info)->flags)

### GST_AUDIO_FORMAT_INFO_FORMAT

    #define GST_AUDIO_FORMAT_INFO_FORMAT(info)           ((info)->format)

### GST_AUDIO_FORMAT_INFO_IS_BIG_ENDIAN

    #define GST_AUDIO_FORMAT_INFO_IS_BIG_ENDIAN(info)    ((info)->endianness == G_BIG_ENDIAN)

### GST_AUDIO_FORMAT_INFO_IS_FLOAT

    #define GST_AUDIO_FORMAT_INFO_IS_FLOAT(info)         !!((info)->flags & GST_AUDIO_FORMAT_FLAG_FLOAT)

### GST_AUDIO_FORMAT_INFO_IS_INTEGER

    #define GST_AUDIO_FORMAT_INFO_IS_INTEGER(info)       !!((info)->flags & GST_AUDIO_FORMAT_FLAG_INTEGER)

### GST_AUDIO_FORMAT_INFO_IS_LITTLE_ENDIAN

    #define GST_AUDIO_FORMAT_INFO_IS_LITTLE_ENDIAN(info) ((info)->endianness == G_LITTLE_ENDIAN)

### GST_AUDIO_FORMAT_INFO_IS_SIGNED

    #define GST_AUDIO_FORMAT_INFO_IS_SIGNED(info)        !!((info)->flags & GST_AUDIO_FORMAT_FLAG_SIGNED)

### GST_AUDIO_FORMAT_INFO_NAME

    #define GST_AUDIO_FORMAT_INFO_NAME(info)             ((info)->name)

### GST_AUDIO_FORMAT_INFO_WIDTH

    #define GST_AUDIO_FORMAT_INFO_WIDTH(info)            ((info)->width)

### GST_AUDIO_NE

    #define GST_AUDIO_NE(s) G_STRINGIFY(s)"LE"

Turns audio format string s into the format string for native endianness.

Parameters:

`s` –

format string without endianness marker

### GST_AUDIO_OE

    #define GST_AUDIO_OE(s) G_STRINGIFY(s)"BE"

Turns audio format string s into the format string for other endianness.

Parameters:

`s` –

format string without endianness marker

### _GST_AUDIO_FORMAT_NE

    #define _GST_AUDIO_FORMAT_NE(fmt) GST_AUDIO_FORMAT_ ## fmt ## BE

### _GST_AUDIO_FORMAT_OE

    #define _GST_AUDIO_FORMAT_OE(fmt) GST_AUDIO_FORMAT_ ## fmt ## LE

## Enumerations

### GstAudioFormat

Enum value describing the most common audio formats.

##### Members

`GST_AUDIO_FORMAT_UNKNOWN` (0) –

unknown or unset audio format

`GST_AUDIO_FORMAT_ENCODED` (1) –

encoded audio format

`GST_AUDIO_FORMAT_S8` (2) –

8 bits in 8 bits, signed

`GST_AUDIO_FORMAT_U8` (3) –

8 bits in 8 bits, unsigned

`GST_AUDIO_FORMAT_S16LE` (4) –

16 bits in 16 bits, signed, little endian

`GST_AUDIO_FORMAT_S16BE` (5) –

16 bits in 16 bits, signed, big endian

`GST_AUDIO_FORMAT_U16LE` (6) –

16 bits in 16 bits, unsigned, little endian

`GST_AUDIO_FORMAT_U16BE` (7) –

16 bits in 16 bits, unsigned, big endian

`GST_AUDIO_FORMAT_S24_32LE` (8) –

24 bits in 32 bits, signed, little endian

`GST_AUDIO_FORMAT_S24_32BE` (9) –

24 bits in 32 bits, signed, big endian

`GST_AUDIO_FORMAT_U24_32LE` (10) –

24 bits in 32 bits, unsigned, little endian

`GST_AUDIO_FORMAT_U24_32BE` (11) –

24 bits in 32 bits, unsigned, big endian

`GST_AUDIO_FORMAT_S32LE` (12) –

32 bits in 32 bits, signed, little endian

`GST_AUDIO_FORMAT_S32BE` (13) –

32 bits in 32 bits, signed, big endian

`GST_AUDIO_FORMAT_U32LE` (14) –

32 bits in 32 bits, unsigned, little endian

`GST_AUDIO_FORMAT_U32BE` (15) –

32 bits in 32 bits, unsigned, big endian

`GST_AUDIO_FORMAT_S24LE` (16) –

24 bits in 24 bits, signed, little endian

`GST_AUDIO_FORMAT_S24BE` (17) –

24 bits in 24 bits, signed, big endian

`GST_AUDIO_FORMAT_U24LE` (18) –

24 bits in 24 bits, unsigned, little endian

`GST_AUDIO_FORMAT_U24BE` (19) –

24 bits in 24 bits, unsigned, big endian

`GST_AUDIO_FORMAT_S20LE` (20) –

20 bits in 24 bits, signed, little endian

`GST_AUDIO_FORMAT_S20BE` (21) –

20 bits in 24 bits, signed, big endian

`GST_AUDIO_FORMAT_U20LE` (22) –

20 bits in 24 bits, unsigned, little endian

`GST_AUDIO_FORMAT_U20BE` (23) –

20 bits in 24 bits, unsigned, big endian

`GST_AUDIO_FORMAT_S18LE` (24) –

18 bits in 24 bits, signed, little endian

`GST_AUDIO_FORMAT_S18BE` (25) –

18 bits in 24 bits, signed, big endian

`GST_AUDIO_FORMAT_U18LE` (26) –

18 bits in 24 bits, unsigned, little endian

`GST_AUDIO_FORMAT_U18BE` (27) –

18 bits in 24 bits, unsigned, big endian

`GST_AUDIO_FORMAT_F32LE` (28) –

32-bit floating point samples, little endian

`GST_AUDIO_FORMAT_F32BE` (29) –

32-bit floating point samples, big endian

`GST_AUDIO_FORMAT_F64LE` (30) –

64-bit floating point samples, little endian

`GST_AUDIO_FORMAT_F64BE` (31) –

64-bit floating point samples, big endian

`GST_AUDIO_FORMAT_S16` (4) –

16 bits in 16 bits, signed, native endianness

`GST_AUDIO_FORMAT_U16` (6) –

16 bits in 16 bits, unsigned, native endianness

`GST_AUDIO_FORMAT_S24_32` (8) –

24 bits in 32 bits, signed, native endianness

`GST_AUDIO_FORMAT_U24_32` (10) –

24 bits in 32 bits, unsigned, native endianness

`GST_AUDIO_FORMAT_S32` (12) –

32 bits in 32 bits, signed, native endianness

`GST_AUDIO_FORMAT_U32` (14) –

32 bits in 32 bits, unsigned, native endianness

`GST_AUDIO_FORMAT_S24` (16) –

24 bits in 24 bits, signed, native endianness

`GST_AUDIO_FORMAT_U24` (18) –

24 bits in 24 bits, unsigned, native endianness

`GST_AUDIO_FORMAT_S20` (20) –

20 bits in 24 bits, signed, native endianness

`GST_AUDIO_FORMAT_U20` (22) –

20 bits in 24 bits, unsigned, native endianness

`GST_AUDIO_FORMAT_S18` (24) –

18 bits in 24 bits, signed, native endianness

`GST_AUDIO_FORMAT_U18` (26) –

18 bits in 24 bits, unsigned, native endianness

`GST_AUDIO_FORMAT_F32` (28) –

32-bit floating point samples, native endianness

`GST_AUDIO_FORMAT_F64` (30) –

64-bit floating point samples, native endianness

### GstAudio.AudioFormat

Enum value describing the most common audio formats.

##### Members

`GstAudio.AudioFormat.UNKNOWN` (0) –

unknown or unset audio format

`GstAudio.AudioFormat.ENCODED` (1) –

encoded audio format

`GstAudio.AudioFormat.S8` (2) –

8 bits in 8 bits, signed

`GstAudio.AudioFormat.U8` (3) –

8 bits in 8 bits, unsigned

`GstAudio.AudioFormat.S16LE` (4) –

16 bits in 16 bits, signed, little endian

`GstAudio.AudioFormat.S16BE` (5) –

16 bits in 16 bits, signed, big endian

`GstAudio.AudioFormat.U16LE` (6) –

16 bits in 16 bits, unsigned, little endian

`GstAudio.AudioFormat.U16BE` (7) –

16 bits in 16 bits, unsigned, big endian

`GstAudio.AudioFormat.S24_32LE` (8) –

24 bits in 32 bits, signed, little endian

`GstAudio.AudioFormat.S24_32BE` (9) –

24 bits in 32 bits, signed, big endian

`GstAudio.AudioFormat.U24_32LE` (10) –

24 bits in 32 bits, unsigned, little endian

`GstAudio.AudioFormat.U24_32BE` (11) –

24 bits in 32 bits, unsigned, big endian

`GstAudio.AudioFormat.S32LE` (12) –

32 bits in 32 bits, signed, little endian

`GstAudio.AudioFormat.S32BE` (13) –

32 bits in 32 bits, signed, big endian

`GstAudio.AudioFormat.U32LE` (14) –

32 bits in 32 bits, unsigned, little endian

`GstAudio.AudioFormat.U32BE` (15) –

32 bits in 32 bits, unsigned, big endian

`GstAudio.AudioFormat.S24LE` (16) –

24 bits in 24 bits, signed, little endian

`GstAudio.AudioFormat.S24BE` (17) –

24 bits in 24 bits, signed, big endian

`GstAudio.AudioFormat.U24LE` (18) –

24 bits in 24 bits, unsigned, little endian

`GstAudio.AudioFormat.U24BE` (19) –

24 bits in 24 bits, unsigned, big endian

`GstAudio.AudioFormat.S20LE` (20) –

20 bits in 24 bits, signed, little endian

`GstAudio.AudioFormat.S20BE` (21) –

20 bits in 24 bits, signed, big endian

`GstAudio.AudioFormat.U20LE` (22) –

20 bits in 24 bits, unsigned, little endian

`GstAudio.AudioFormat.U20BE` (23) –

20 bits in 24 bits, unsigned, big endian

`GstAudio.AudioFormat.S18LE` (24) –

18 bits in 24 bits, signed, little endian

`GstAudio.AudioFormat.S18BE` (25) –

18 bits in 24 bits, signed, big endian

`GstAudio.AudioFormat.U18LE` (26) –

18 bits in 24 bits, unsigned, little endian

`GstAudio.AudioFormat.U18BE` (27) –

18 bits in 24 bits, unsigned, big endian

`GstAudio.AudioFormat.F32LE` (28) –

32-bit floating point samples, little endian

`GstAudio.AudioFormat.F32BE` (29) –

32-bit floating point samples, big endian

`GstAudio.AudioFormat.F64LE` (30) –

64-bit floating point samples, little endian

`GstAudio.AudioFormat.F64BE` (31) –

64-bit floating point samples, big endian

`GstAudio.AudioFormat.S16` (4) –

16 bits in 16 bits, signed, native endianness

`GstAudio.AudioFormat.U16` (6) –

16 bits in 16 bits, unsigned, native endianness

`GstAudio.AudioFormat.S24_32` (8) –

24 bits in 32 bits, signed, native endianness

`GstAudio.AudioFormat.U24_32` (10) –

24 bits in 32 bits, unsigned, native endianness

`GstAudio.AudioFormat.S32` (12) –

32 bits in 32 bits, signed, native endianness

`GstAudio.AudioFormat.U32` (14) –

32 bits in 32 bits, unsigned, native endianness

`GstAudio.AudioFormat.S24` (16) –

24 bits in 24 bits, signed, native endianness

`GstAudio.AudioFormat.U24` (18) –

24 bits in 24 bits, unsigned, native endianness

`GstAudio.AudioFormat.S20` (20) –

20 bits in 24 bits, signed, native endianness

`GstAudio.AudioFormat.U20` (22) –

20 bits in 24 bits, unsigned, native endianness

`GstAudio.AudioFormat.S18` (24) –

18 bits in 24 bits, signed, native endianness

`GstAudio.AudioFormat.U18` (26) –

18 bits in 24 bits, unsigned, native endianness

`GstAudio.AudioFormat.F32` (28) –

32-bit floating point samples, native endianness

`GstAudio.AudioFormat.F64` (30) –

64-bit floating point samples, native endianness

### GstAudio.AudioFormat

Enum value describing the most common audio formats.

##### Members

`GstAudio.AudioFormat.UNKNOWN` (0) –

unknown or unset audio format

`GstAudio.AudioFormat.ENCODED` (1) –

encoded audio format

`GstAudio.AudioFormat.S8` (2) –

8 bits in 8 bits, signed

`GstAudio.AudioFormat.U8` (3) –

8 bits in 8 bits, unsigned

`GstAudio.AudioFormat.S16LE` (4) –

16 bits in 16 bits, signed, little endian

`GstAudio.AudioFormat.S16BE` (5) –

16 bits in 16 bits, signed, big endian

`GstAudio.AudioFormat.U16LE` (6) –

16 bits in 16 bits, unsigned, little endian

`GstAudio.AudioFormat.U16BE` (7) –

16 bits in 16 bits, unsigned, big endian

`GstAudio.AudioFormat.S24_32LE` (8) –

24 bits in 32 bits, signed, little endian

`GstAudio.AudioFormat.S24_32BE` (9) –

24 bits in 32 bits, signed, big endian

`GstAudio.AudioFormat.U24_32LE` (10) –

24 bits in 32 bits, unsigned, little endian

`GstAudio.AudioFormat.U24_32BE` (11) –

24 bits in 32 bits, unsigned, big endian

`GstAudio.AudioFormat.S32LE` (12) –

32 bits in 32 bits, signed, little endian

`GstAudio.AudioFormat.S32BE` (13) –

32 bits in 32 bits, signed, big endian

`GstAudio.AudioFormat.U32LE` (14) –

32 bits in 32 bits, unsigned, little endian

`GstAudio.AudioFormat.U32BE` (15) –

32 bits in 32 bits, unsigned, big endian

`GstAudio.AudioFormat.S24LE` (16) –

24 bits in 24 bits, signed, little endian

`GstAudio.AudioFormat.S24BE` (17) –

24 bits in 24 bits, signed, big endian

`GstAudio.AudioFormat.U24LE` (18) –

24 bits in 24 bits, unsigned, little endian

`GstAudio.AudioFormat.U24BE` (19) –

24 bits in 24 bits, unsigned, big endian

`GstAudio.AudioFormat.S20LE` (20) –

20 bits in 24 bits, signed, little endian

`GstAudio.AudioFormat.S20BE` (21) –

20 bits in 24 bits, signed, big endian

`GstAudio.AudioFormat.U20LE` (22) –

20 bits in 24 bits, unsigned, little endian

`GstAudio.AudioFormat.U20BE` (23) –

20 bits in 24 bits, unsigned, big endian

`GstAudio.AudioFormat.S18LE` (24) –

18 bits in 24 bits, signed, little endian

`GstAudio.AudioFormat.S18BE` (25) –

18 bits in 24 bits, signed, big endian

`GstAudio.AudioFormat.U18LE` (26) –

18 bits in 24 bits, unsigned, little endian

`GstAudio.AudioFormat.U18BE` (27) –

18 bits in 24 bits, unsigned, big endian

`GstAudio.AudioFormat.F32LE` (28) –

32-bit floating point samples, little endian

`GstAudio.AudioFormat.F32BE` (29) –

32-bit floating point samples, big endian

`GstAudio.AudioFormat.F64LE` (30) –

64-bit floating point samples, little endian

`GstAudio.AudioFormat.F64BE` (31) –

64-bit floating point samples, big endian

`GstAudio.AudioFormat.S16` (4) –

16 bits in 16 bits, signed, native endianness

`GstAudio.AudioFormat.U16` (6) –

16 bits in 16 bits, unsigned, native endianness

`GstAudio.AudioFormat.S24_32` (8) –

24 bits in 32 bits, signed, native endianness

`GstAudio.AudioFormat.U24_32` (10) –

24 bits in 32 bits, unsigned, native endianness

`GstAudio.AudioFormat.S32` (12) –

32 bits in 32 bits, signed, native endianness

`GstAudio.AudioFormat.U32` (14) –

32 bits in 32 bits, unsigned, native endianness

`GstAudio.AudioFormat.S24` (16) –

24 bits in 24 bits, signed, native endianness

`GstAudio.AudioFormat.U24` (18) –

24 bits in 24 bits, unsigned, native endianness

`GstAudio.AudioFormat.S20` (20) –

20 bits in 24 bits, signed, native endianness

`GstAudio.AudioFormat.U20` (22) –

20 bits in 24 bits, unsigned, native endianness

`GstAudio.AudioFormat.S18` (24) –

18 bits in 24 bits, signed, native endianness

`GstAudio.AudioFormat.U18` (26) –

18 bits in 24 bits, unsigned, native endianness

`GstAudio.AudioFormat.F32` (28) –

32-bit floating point samples, native endianness

`GstAudio.AudioFormat.F64` (30) –

64-bit floating point samples, native endianness

### GstAudioFormatFlags

The different audio flags that a format info can have.

##### Members

`GST_AUDIO_FORMAT_FLAG_INTEGER` (1) –

integer samples

`GST_AUDIO_FORMAT_FLAG_FLOAT` (2) –

float samples

`GST_AUDIO_FORMAT_FLAG_SIGNED` (4) –

signed samples

`GST_AUDIO_FORMAT_FLAG_COMPLEX` (16) –

complex layout

`GST_AUDIO_FORMAT_FLAG_UNPACK` (32) –

the format can be used in GstAudioFormatUnpack and GstAudioFormatPack functions

### GstAudio.AudioFormatFlags

The different audio flags that a format info can have.

##### Members

`GstAudio.AudioFormatFlags.INTEGER` (1) –

integer samples

`GstAudio.AudioFormatFlags.FLOAT` (2) –

float samples

`GstAudio.AudioFormatFlags.SIGNED` (4) –

signed samples

`GstAudio.AudioFormatFlags.COMPLEX` (16) –

complex layout

`GstAudio.AudioFormatFlags.UNPACK` (32) –

the format can be used in GstAudio.AudioFormatUnpack and GstAudio.AudioFormatPack functions

### GstAudio.AudioFormatFlags

The different audio flags that a format info can have.

##### Members

`GstAudio.AudioFormatFlags.INTEGER` (1) –

integer samples

`GstAudio.AudioFormatFlags.FLOAT` (2) –

float samples

`GstAudio.AudioFormatFlags.SIGNED` (4) –

signed samples

`GstAudio.AudioFormatFlags.COMPLEX` (16) –

complex layout

`GstAudio.AudioFormatFlags.UNPACK` (32) –

the format can be used in GstAudio.AudioFormatUnpack and GstAudio.AudioFormatPack functions

### GstAudioLayout

Layout of the audio samples for the different channels.

##### Members

`GST_AUDIO_LAYOUT_INTERLEAVED` (0) –

interleaved audio

`GST_AUDIO_LAYOUT_NON_INTERLEAVED` (1) –

non-interleaved audio

### GstAudio.AudioLayout

Layout of the audio samples for the different channels.

##### Members

`GstAudio.AudioLayout.INTERLEAVED` (0) –

interleaved audio

`GstAudio.AudioLayout.NON_INTERLEAVED` (1) –

non-interleaved audio

### GstAudio.AudioLayout

Layout of the audio samples for the different channels.

##### Members

`GstAudio.AudioLayout.INTERLEAVED` (0) –

interleaved audio

`GstAudio.AudioLayout.NON_INTERLEAVED` (1) –

non-interleaved audio

### GstAudioPackFlags

The different flags that can be used when packing and unpacking.

##### Members

`GST_AUDIO_PACK_FLAG_NONE` (0) –

No flag

`GST_AUDIO_PACK_FLAG_TRUNCATE_RANGE` (1) –

When the source has a smaller depth than the target format, set the least significant bits of the target to 0. This is likely slightly faster but less accurate. When this flag is not specified, the most significant bits of the source are duplicated in the least significant bits of the destination.

### GstAudio.AudioPackFlags

The different flags that can be used when packing and unpacking.

##### Members

`GstAudio.AudioPackFlags.NONE` (0) –

No flag

`GstAudio.AudioPackFlags.TRUNCATE_RANGE` (1) –

When the source has a smaller depth than the target format, set the least significant bits of the target to 0. This is likely slightly faster but less accurate. When this flag is not specified, the most significant bits of the source are duplicated in the least significant bits of the destination.

### GstAudio.AudioPackFlags

The different flags that can be used when packing and unpacking.

##### Members

`GstAudio.AudioPackFlags.NONE` (0) –

No flag

`GstAudio.AudioPackFlags.TRUNCATE_RANGE` (1) –

When the source has a smaller depth than the target format, set the least significant bits of the target to 0. This is likely slightly faster but less accurate. When this flag is not specified, the most significant bits of the source are duplicated in the least significant bits of the destination.

## Constants

### GST_AUDIO_CHANNELS_RANGE

    #define GST_AUDIO_CHANNELS_RANGE "(int) [ 1, max ]"

Maximum range of allowed channels, for use in template caps strings.

### GstAudio.AUDIO_CHANNELS_RANGE

Maximum range of allowed channels, for use in template caps strings.

### GstAudio.AUDIO_CHANNELS_RANGE

Maximum range of allowed channels, for use in template caps strings.

### GST_AUDIO_DEF_CHANNELS

    #define GST_AUDIO_DEF_CHANNELS 2

Standard number of channels used in consumer audio.

### GstAudio.AUDIO_DEF_CHANNELS

Standard number of channels used in consumer audio.

### GstAudio.AUDIO_DEF_CHANNELS

Standard number of channels used in consumer audio.

### GST_AUDIO_DEF_FORMAT

    #define GST_AUDIO_DEF_FORMAT "S16LE"

Standard format used in consumer audio.

### GstAudio.AUDIO_DEF_FORMAT

Standard format used in consumer audio.

### GstAudio.AUDIO_DEF_FORMAT

Standard format used in consumer audio.

### GST_AUDIO_DEF_RATE

    #define GST_AUDIO_DEF_RATE 44100

Standard sampling rate used in consumer audio.

### GstAudio.AUDIO_DEF_RATE

Standard sampling rate used in consumer audio.

### GstAudio.AUDIO_DEF_RATE

Standard sampling rate used in consumer audio.

### GST_AUDIO_FORMATS_ALL

    #define GST_AUDIO_FORMATS_ALL "{ F64BE, F64LE, " \
        "F32BE, F32LE, S32BE, S32LE, U32BE, U32LE, " \
        "S24_32BE, S24_32LE, U24_32BE, U24_32LE, " \
        "S24BE, S24LE, U24BE, U24LE, " \
        "S20BE, S20LE, U20BE, U20LE, " \
        "S18BE, S18LE, U18BE, U18LE, " \
        "S16BE, S16LE, U16BE, U16LE, " \
        "S8, U8 }"

List of all audio formats, for use in template caps strings.

Formats are sorted by decreasing "quality", using these criteria by priority:

- depth
- width
- Float > Signed > Unsigned
- native endianness preferred

### GstAudio.AUDIO_FORMATS_ALL

List of all audio formats, for use in template caps strings.

Formats are sorted by decreasing "quality", using these criteria by priority:

- depth
- width
- Float > Signed > Unsigned
- native endianness preferred

### GstAudio.AUDIO_FORMATS_ALL

List of all audio formats, for use in template caps strings.

Formats are sorted by decreasing "quality", using these criteria by priority:

- depth
- width
- Float > Signed > Unsigned
- native endianness preferred

### GST_AUDIO_RATE_RANGE

    #define GST_AUDIO_RATE_RANGE "(int) [ 1, max ]"

Maximum range of allowed sample rates, for use in template caps strings.

### GstAudio.AUDIO_RATE_RANGE

Maximum range of allowed sample rates, for use in template caps strings.

### GstAudio.AUDIO_RATE_RANGE

Maximum range of allowed sample rates, for use in template caps strings.

## Callbacks

### GstAudioFormatPack

    (*GstAudioFormatPack) (const GstAudioFormatInfo * info,
                           GstAudioPackFlags flags,
                           gconstpointer src,
                           gpointer data,
                           gint length)

Packs length samples from src to the data array in format info. The samples from source have each channel interleaved and will be packed into data.

Parameters:

`info` –

a GstAudioFormatInfo

`flags` –

GstAudioPackFlags

`src` ( [array][element-typeguint8]) –

a source array

`data` ( [array][element-typeguint8]) –

pointer to the destination data

`length` –

the amount of samples to pack.

### GstAudio.AudioFormatPack

    function GstAudio.AudioFormatPack(info: GstAudio.AudioFormatInfo, flags: GstAudio.AudioPackFlags, src: [ Number ], data: [ Number ], length: Number): {
        // javascript wrapper for 'GstAudioFormatPack'
    }

Packs length samples from src to the data array in format info. The samples from source have each channel interleaved and will be packed into data.

Parameters:

`info` (GstAudio.AudioFormatInfo) –

a GstAudio.AudioFormatInfo

`flags` (GstAudio.AudioPackFlags) –

GstAudio.AudioPackFlags

`src` ([ Number ]) –

a source array

`data` ([ Number ]) –

pointer to the destination data

`length` (Number) –

the amount of samples to pack.

### GstAudio.AudioFormatPack

    def GstAudio.AudioFormatPack (info, flags, src, data, length):
        #python wrapper for 'GstAudioFormatPack'

Packs length samples from src to the data array in format info. The samples from source have each channel interleaved and will be packed into data.

Parameters:

`info` (GstAudio.AudioFormatInfo) –

a GstAudio.AudioFormatInfo

`flags` (GstAudio.AudioPackFlags) –

GstAudio.AudioPackFlags

`src` ([ int ]) –

a source array

`data` ([ int ]) –

pointer to the destination data

`length` (int) –

the amount of samples to pack.

### GstAudioFormatUnpack

    (*GstAudioFormatUnpack) (const GstAudioFormatInfo * info,
                             GstAudioPackFlags flags,
                             gpointer dest,
                             gconstpointer data,
                             gint length)

Unpacks length samples from the given data of format info. The samples will be unpacked into dest which each channel interleaved. dest should at least be big enough to hold length * channels * size(unpack_format) bytes.

Parameters:

`info` –

a GstAudioFormatInfo

`flags` –

GstAudioPackFlags

`dest` ( [array][element-typeguint8]) –

a destination array

`data` ( [array][element-typeguint8]) –

pointer to the audio data

`length` –

the amount of samples to unpack.

### GstAudio.AudioFormatUnpack

    function GstAudio.AudioFormatUnpack(info: GstAudio.AudioFormatInfo, flags: GstAudio.AudioPackFlags, dest: [ Number ], data: [ Number ], length: Number): {
        // javascript wrapper for 'GstAudioFormatUnpack'
    }

Unpacks length samples from the given data of format info. The samples will be unpacked into dest which each channel interleaved. dest should at least be big enough to hold length * channels * size(unpack_format) bytes.

Parameters:

`info` (GstAudio.AudioFormatInfo) –

a GstAudio.AudioFormatInfo

`flags` (GstAudio.AudioPackFlags) –

GstAudio.AudioPackFlags

`dest` ([ Number ]) –

a destination array

`data` ([ Number ]) –

pointer to the audio data

`length` (Number) –

the amount of samples to unpack.

### GstAudio.AudioFormatUnpack

    def GstAudio.AudioFormatUnpack (info, flags, dest, data, length):
        #python wrapper for 'GstAudioFormatUnpack'

Unpacks length samples from the given data of format info. The samples will be unpacked into dest which each channel interleaved. dest should at least be big enough to hold length * channels * size(unpack_format) bytes.

Parameters:

`info` (GstAudio.AudioFormatInfo) –

a GstAudio.AudioFormatInfo

`flags` (GstAudio.AudioPackFlags) –

GstAudio.AudioPackFlags

`dest` ([ int ]) –

a destination array

`data` ([ int ]) –

pointer to the audio data

`length` (int) –

the amount of samples to unpack.

The results of the search are