Skip to content

Sdl openAudioDevice

Tangent 128 edited this page Mar 28, 2015 · 3 revisions

SDL.openAudioDevice

Open an audio device.

The spec table may or must have the following fields:

  • callback, a path to a .lua file which returns the callback function (see AudioCallback)
  • iscapture, set to true if capture is required
  • allowchanges, (optional) allow modifications of the specifications
  • device, (optional) the device name
  • frequency, (optional) the frequency
  • format, (optional) the format (see SDL.audioFormat)
  • channels, (optional) number of channels
  • samples, (optional) number of samples

Function

SYNOPSIS

dev, err = function SDL.openAudioDevice(spec)

ARGUMENTS

  • spec, the specifications

RETURNS

  • dev, the device or nil on failure (see AudioDevice)
  • err, the error message
Clone this wiki locally