Added API documentation for audio subsystem
This commit is contained in:
19
doc/api.md
19
doc/api.md
@@ -224,6 +224,18 @@ Writes `string` to the given `filename` in the game's save directory.
|
|||||||
Pushes the `quit` event with the given `status`. `status` is `0` by default.
|
Pushes the `quit` event with the given `status`. `status` is `0` by default.
|
||||||
|
|
||||||
|
|
||||||
|
### love.sound
|
||||||
|
##### love.sound.newSource(filename)
|
||||||
|
Creates a new sound source from the given `filename`.
|
||||||
|
At the moment only one file and audio format is supported: 16 bit signed PCM mono WAVE files at 22050Hz. Everything else
|
||||||
|
will result in a load error.
|
||||||
|
|
||||||
|
|
||||||
|
### love.sound.mix()
|
||||||
|
Must be called once per frame to mix the playing audio sources for submission to the soundblaster driver.
|
||||||
|
It's automatically called by the default love.run() implementation.
|
||||||
|
|
||||||
|
|
||||||
## Objects
|
## Objects
|
||||||
### Image
|
### Image
|
||||||
A loaded image or canvas which can be drawn.
|
A loaded image or canvas which can be drawn.
|
||||||
@@ -271,6 +283,13 @@ this font.
|
|||||||
Returns the height of the font in pixels.
|
Returns the height of the font in pixels.
|
||||||
|
|
||||||
|
|
||||||
|
### Source
|
||||||
|
A sound source used by the audio subsystem.
|
||||||
|
|
||||||
|
##### Source:play()
|
||||||
|
Starts playing the source.
|
||||||
|
|
||||||
|
|
||||||
## Callbacks
|
## Callbacks
|
||||||
##### love.load(args)
|
##### love.load(args)
|
||||||
Called when LoveDOS is started. `args` is a table containing the command line
|
Called when LoveDOS is started. `args` is a table containing the command line
|
||||||
|
|||||||
Reference in New Issue
Block a user