{
  "header": "SDL_audio.h",
  "opaque_types": [
    {
      "name": "SDL_AudioStream"
    }
  ],
  "typedefs": [
    {
      "name": "SDL_AudioDeviceID",
      "underlying_type": "Uint32"
    }
  ],
  "function_pointers": [],
  "c_type_aliases": [
    {
      "name": "SDL_AudioStreamCallback"
    },
    {
      "name": "SDL_AudioPostmixCallback"
    }
  ],
  "enums": [
    {
      "name": "SDL_AudioFormat",
      "values": [
        {
          "name": "SDL_AUDIO_UNKNOWN",
          "value": "0x0000u",
          "comment": "Unspecified audio format"
        },
        {
          "name": "SDL_AUDIO_U8",
          "value": "0x0008u",
          "comment": "Unsigned 8-bit samples"
        },
        {
          "name": "SDL_AUDIO_S8",
          "value": "0x8008u",
          "comment": "Signed 8-bit samples"
        },
        {
          "name": "SDL_AUDIO_S16LE",
          "value": "0x8010u",
          "comment": "Signed 16-bit samples"
        },
        {
          "name": "SDL_AUDIO_S16BE",
          "value": "0x9010u",
          "comment": "As above, but big-endian byte order"
        },
        {
          "name": "SDL_AUDIO_S32LE",
          "value": "0x8020u",
          "comment": "32-bit integer samples"
        },
        {
          "name": "SDL_AUDIO_S32BE",
          "value": "0x9020u",
          "comment": "As above, but big-endian byte order"
        },
        {
          "name": "SDL_AUDIO_F32LE",
          "value": "0x8120u",
          "comment": "32-bit floating point samples"
        },
        {
          "name": "SDL_AUDIO_F32BE",
          "value": "0x9120u",
          "comment": "As above, but big-endian byte order"
        }
      ]
    }
  ],
  "structs": [
    {
      "name": "SDL_AudioSpec",
      "fields": [
        {
          "name": "format",
          "type": "SDL_AudioFormat",
          "comment": "Audio data format"
        },
        {
          "name": "channels",
          "type": "int",
          "comment": "Number of channels: 1 mono, 2 stereo, etc"
        },
        {
          "name": "freq",
          "type": "int",
          "comment": "sample rate: sample frames per second"
        }
      ]
    }
  ],
  "unions": [],
  "flags": [],
  "functions": [
    {
      "name": "SDL_GetNumAudioDrivers",
      "return_type": "int",
      "parameters": []
    },
    {
      "name": "SDL_GetAudioDriver",
      "return_type": "const char *",
      "parameters": [
        {
          "name": "index",
          "type": "int"
        }
      ]
    },
    {
      "name": "SDL_GetCurrentAudioDriver",
      "return_type": "const char *",
      "parameters": []
    },
    {
      "name": "SDL_GetAudioPlaybackDevices",
      "return_type": "SDL_AudioDeviceID *",
      "parameters": [
        {
          "name": "count",
          "type": "int *"
        }
      ]
    },
    {
      "name": "SDL_GetAudioRecordingDevices",
      "return_type": "SDL_AudioDeviceID *",
      "parameters": [
        {
          "name": "count",
          "type": "int *"
        }
      ]
    },
    {
      "name": "SDL_GetAudioDeviceName",
      "return_type": "const char *",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        }
      ]
    },
    {
      "name": "SDL_GetAudioDeviceFormat",
      "return_type": "bool",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        },
        {
          "name": "spec",
          "type": "SDL_AudioSpec *"
        },
        {
          "name": "sample_frames",
          "type": "int *"
        }
      ]
    },
    {
      "name": "SDL_GetAudioDeviceChannelMap",
      "return_type": "int *",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        },
        {
          "name": "count",
          "type": "int *"
        }
      ]
    },
    {
      "name": "SDL_OpenAudioDevice",
      "return_type": "SDL_AudioDeviceID",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        },
        {
          "name": "spec",
          "type": "const SDL_AudioSpec *"
        }
      ]
    },
    {
      "name": "SDL_IsAudioDevicePhysical",
      "return_type": "bool",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        }
      ]
    },
    {
      "name": "SDL_IsAudioDevicePlayback",
      "return_type": "bool",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        }
      ]
    },
    {
      "name": "SDL_PauseAudioDevice",
      "return_type": "bool",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        }
      ]
    },
    {
      "name": "SDL_ResumeAudioDevice",
      "return_type": "bool",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        }
      ]
    },
    {
      "name": "SDL_AudioDevicePaused",
      "return_type": "bool",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        }
      ]
    },
    {
      "name": "SDL_GetAudioDeviceGain",
      "return_type": "float",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        }
      ]
    },
    {
      "name": "SDL_SetAudioDeviceGain",
      "return_type": "bool",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        },
        {
          "name": "gain",
          "type": "float"
        }
      ]
    },
    {
      "name": "SDL_CloseAudioDevice",
      "return_type": "void",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        }
      ]
    },
    {
      "name": "SDL_BindAudioStreams",
      "return_type": "bool",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        },
        {
          "name": "streams",
          "type": "SDL_AudioStream * const *"
        },
        {
          "name": "num_streams",
          "type": "int"
        }
      ]
    },
    {
      "name": "SDL_BindAudioStream",
      "return_type": "bool",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        },
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_UnbindAudioStreams",
      "return_type": "void",
      "parameters": [
        {
          "name": "streams",
          "type": "SDL_AudioStream * const *"
        },
        {
          "name": "num_streams",
          "type": "int"
        }
      ]
    },
    {
      "name": "SDL_UnbindAudioStream",
      "return_type": "void",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_GetAudioStreamDevice",
      "return_type": "SDL_AudioDeviceID",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_CreateAudioStream",
      "return_type": "SDL_AudioStream *",
      "parameters": [
        {
          "name": "src_spec",
          "type": "const SDL_AudioSpec *"
        },
        {
          "name": "dst_spec",
          "type": "const SDL_AudioSpec *"
        }
      ]
    },
    {
      "name": "SDL_GetAudioStreamProperties",
      "return_type": "SDL_PropertiesID",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_GetAudioStreamFormat",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        },
        {
          "name": "src_spec",
          "type": "SDL_AudioSpec *"
        },
        {
          "name": "dst_spec",
          "type": "SDL_AudioSpec *"
        }
      ]
    },
    {
      "name": "SDL_SetAudioStreamFormat",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        },
        {
          "name": "src_spec",
          "type": "const SDL_AudioSpec *"
        },
        {
          "name": "dst_spec",
          "type": "const SDL_AudioSpec *"
        }
      ]
    },
    {
      "name": "SDL_GetAudioStreamFrequencyRatio",
      "return_type": "float",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_SetAudioStreamFrequencyRatio",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        },
        {
          "name": "ratio",
          "type": "float"
        }
      ]
    },
    {
      "name": "SDL_GetAudioStreamGain",
      "return_type": "float",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_SetAudioStreamGain",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        },
        {
          "name": "gain",
          "type": "float"
        }
      ]
    },
    {
      "name": "SDL_GetAudioStreamInputChannelMap",
      "return_type": "int *",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        },
        {
          "name": "count",
          "type": "int *"
        }
      ]
    },
    {
      "name": "SDL_GetAudioStreamOutputChannelMap",
      "return_type": "int *",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        },
        {
          "name": "count",
          "type": "int *"
        }
      ]
    },
    {
      "name": "SDL_SetAudioStreamInputChannelMap",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        },
        {
          "name": "chmap",
          "type": "const int *"
        },
        {
          "name": "count",
          "type": "int"
        }
      ]
    },
    {
      "name": "SDL_SetAudioStreamOutputChannelMap",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        },
        {
          "name": "chmap",
          "type": "const int *"
        },
        {
          "name": "count",
          "type": "int"
        }
      ]
    },
    {
      "name": "SDL_PutAudioStreamData",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        },
        {
          "name": "buf",
          "type": "const void *"
        },
        {
          "name": "len",
          "type": "int"
        }
      ]
    },
    {
      "name": "SDL_GetAudioStreamData",
      "return_type": "int",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        },
        {
          "name": "buf",
          "type": "void *"
        },
        {
          "name": "len",
          "type": "int"
        }
      ]
    },
    {
      "name": "SDL_GetAudioStreamAvailable",
      "return_type": "int",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_GetAudioStreamQueued",
      "return_type": "int",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_FlushAudioStream",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_ClearAudioStream",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_PauseAudioStreamDevice",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_ResumeAudioStreamDevice",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_AudioStreamDevicePaused",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_LockAudioStream",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_UnlockAudioStream",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_SetAudioStreamGetCallback",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        },
        {
          "name": "callback",
          "type": "SDL_AudioStreamCallback"
        },
        {
          "name": "userdata",
          "type": "void *"
        }
      ]
    },
    {
      "name": "SDL_SetAudioStreamPutCallback",
      "return_type": "bool",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        },
        {
          "name": "callback",
          "type": "SDL_AudioStreamCallback"
        },
        {
          "name": "userdata",
          "type": "void *"
        }
      ]
    },
    {
      "name": "SDL_DestroyAudioStream",
      "return_type": "void",
      "parameters": [
        {
          "name": "stream",
          "type": "SDL_AudioStream *"
        }
      ]
    },
    {
      "name": "SDL_OpenAudioDeviceStream",
      "return_type": "SDL_AudioStream *",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        },
        {
          "name": "spec",
          "type": "const SDL_AudioSpec *"
        },
        {
          "name": "callback",
          "type": "SDL_AudioStreamCallback"
        },
        {
          "name": "userdata",
          "type": "void *"
        }
      ]
    },
    {
      "name": "SDL_SetAudioPostmixCallback",
      "return_type": "bool",
      "parameters": [
        {
          "name": "devid",
          "type": "SDL_AudioDeviceID"
        },
        {
          "name": "callback",
          "type": "SDL_AudioPostmixCallback"
        },
        {
          "name": "userdata",
          "type": "void *"
        }
      ]
    },
    {
      "name": "SDL_LoadWAV_IO",
      "return_type": "bool",
      "parameters": [
        {
          "name": "src",
          "type": "SDL_IOStream *"
        },
        {
          "name": "closeio",
          "type": "bool"
        },
        {
          "name": "spec",
          "type": "SDL_AudioSpec *"
        },
        {
          "name": "audio_buf",
          "type": "Uint8 **"
        },
        {
          "name": "audio_len",
          "type": "Uint32 *"
        }
      ]
    },
    {
      "name": "SDL_LoadWAV",
      "return_type": "bool",
      "parameters": [
        {
          "name": "path",
          "type": "const char *"
        },
        {
          "name": "spec",
          "type": "SDL_AudioSpec *"
        },
        {
          "name": "audio_buf",
          "type": "Uint8 **"
        },
        {
          "name": "audio_len",
          "type": "Uint32 *"
        }
      ]
    },
    {
      "name": "SDL_MixAudio",
      "return_type": "bool",
      "parameters": [
        {
          "name": "dst",
          "type": "Uint8 *"
        },
        {
          "name": "src",
          "type": "const Uint8 *"
        },
        {
          "name": "format",
          "type": "SDL_AudioFormat"
        },
        {
          "name": "len",
          "type": "Uint32"
        },
        {
          "name": "volume",
          "type": "float"
        }
      ]
    },
    {
      "name": "SDL_ConvertAudioSamples",
      "return_type": "bool",
      "parameters": [
        {
          "name": "src_spec",
          "type": "const SDL_AudioSpec *"
        },
        {
          "name": "src_data",
          "type": "const Uint8 *"
        },
        {
          "name": "src_len",
          "type": "int"
        },
        {
          "name": "dst_spec",
          "type": "const SDL_AudioSpec *"
        },
        {
          "name": "dst_data",
          "type": "Uint8 **"
        },
        {
          "name": "dst_len",
          "type": "int *"
        }
      ]
    },
    {
      "name": "SDL_GetAudioFormatName",
      "return_type": "const char *",
      "parameters": [
        {
          "name": "format",
          "type": "SDL_AudioFormat"
        }
      ]
    },
    {
      "name": "SDL_GetSilenceValueForFormat",
      "return_type": "int",
      "parameters": [
        {
          "name": "format",
          "type": "SDL_AudioFormat"
        }
      ]
    }
  ]
}