From 146406fac444eb1e414ed4fa1df4c912695ed842 Mon Sep 17 00:00:00 2001 From: rnlf Date: Sun, 22 Jan 2017 20:46:32 +0100 Subject: [PATCH] Added API documentation for audio subsystem --- doc/api.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/api.md b/doc/api.md index cfabd8e..938bfd1 100644 --- a/doc/api.md +++ b/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. +### 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 ### Image A loaded image or canvas which can be drawn. @@ -271,6 +283,13 @@ this font. Returns the height of the font in pixels. +### Source +A sound source used by the audio subsystem. + +##### Source:play() +Starts playing the source. + + ## Callbacks ##### love.load(args) Called when LoveDOS is started. `args` is a table containing the command line