# Class cocos.audio.SDL.audio.SDL_AudioSpec

        ??._CData --+
                    |
    _ctypes.Structure --+
                        |
                       SDL_AudioSpec

Audio format structure.

The calculated values in this structure are calculated by SDL_OpenAudio.

## Methods

Inherited from `_ctypes.Structure`: `__init__`, `__new__` Inherited from `unreachable._CData`: `__ctypes_from_outparam__`, `__hash__`, `__reduce__`, `__setstate__`

## Properties

Inherited from `unreachable._CData`: `_b_base_`, `_b_needsfree_`

## Instance Variables

int | channels = `<Field type=c_ubyte, ofs=6, size=1>` Number of channels; 1 for mono or 2 for stereo.
int | format = `<Field type=c_ushort, ofs=4, size=2>` Audio data format.
int | freq = `<Field type=c_long, ofs=0, size=4>` DSP frequency, in samples per second
int | samples = `<Field type=c_ushort, ofs=8, size=2>` Audio buffer size in samples (power of 2)
int | silence = `<Field type=c_ubyte, ofs=7, size=1>` Audio buffer silence value (calculated)
int | size = `<Field type=c_ulong, ofs=12, size=4>` Audio buffer size in bytes (calculated)

## Class Variables

| _fields_ = ``[``(``'``freq``'``,` <class 'ctypes.c_long'>`)``,` `(``'``format``'``,` <cla`...``

## Instance Variable Details

### format

Audio data format. One of AUDIO_U8, AUDIO_S8, AUDIO_U16LSB, AUDIO_S16LSB, AUDIO_U16MSB or AUDIO_S16MSB

Type:
  int
Value:

      <Field type=c_ushort, ofs=4, size=2>

## Class Variable Details

### _fields_

Value:

      [('freq', <class 'ctypes.c_long'>),
       ('format', <class 'ctypes.c_ushort'>),
       ('channels', <class 'ctypes.c_ubyte'>),
       ('silence', <class 'ctypes.c_ubyte'>),
       ('samples', <class 'ctypes.c_ushort'>),
       ('_padding', <class 'ctypes.c_ushort'>),
       ('size', <class 'ctypes.c_ulong'>),
       ('_callback', <class 'ctypes.CFunctionType'>),
      ...