lao documentation
lao version 1.0.0 - 20100905
ao.openFile
Open a file for audio output. The file format is determined by the audio driver used.
userdata device, string error = ao.openLive(number driverId, string filename, boolean overwrite, table format, table options)
Parameters
- driverId
- filename
- Name of the file in which to store the audio.
- overwrite
-
True to overwrite the file if it exists, false to abort the opening
if a file with that name already exists.
- format
-
A table describing the sample format.
-
See also: sampleFormat
- options
-
A table containing options.
-
See also: options
Return Values
- device
-
A non-nil result indicates success. You can now use the devices
metamethods play and
close to play audio and close the
device.
-
A nil result means something went wrong. The error message is
returned as the second return value.
- error
-
A string describing what went wrong (if anything went wrong).
This can be one of the following:
- no such driver
- not a file-type driver
- a valid option-key has an invalid value
- cannot open the file
- file already exists
- something went wrong
Notes
Live output drivers cannot be used with this function. Use
ao.openLive instead.
When passed to ao.openFile, the byteFormat member of a
format table does not specify the byte format that will be used in
the file output, just the input sample format.
developed by Linus Sjögren
thelinx@unreliablepollution.net
back to index
this project at GitHub