[AD] acodec docs

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I wrote some descriptions for the acodec addon, since they are not currently documented.
Attached is a diff to make the new file and add it to the index page.
diff -Nur ./docsA/src/refman/CMakeLists.txt ./docsB/src/refman/CMakeLists.txt
--- ./docsA/src/refman/CMakeLists.txt	2009-02-19 22:13:21.000000000 -0500
+++ ./docsB/src/refman/CMakeLists.txt	2009-02-19 22:04:13.000000000 -0500
@@ -1,4 +1,5 @@
 set(PAGES
+    acodec
     color
     config
     display
diff -Nur ./docsA/src/refman/acodec.txt ./docsB/src/refman/acodec.txt
--- ./docsA/src/refman/acodec.txt	1969-12-31 19:00:00.000000000 -0500
+++ ./docsB/src/refman/acodec.txt	2009-02-19 22:04:13.000000000 -0500
@@ -0,0 +1,43 @@
+# Audio Codec Loader
+
+## API: al_load_sample
+
+Loads a few different audio file formats based on their extension.
+Some formats require external libraries to be installed prior to compiling
+the library.
+
+Note that this stores the entire file in memory at once, which
+may be time consuming.  To read the file as it is needed, 
+use [al_stream_from_file].
+
+File types supported:
+
+* wav
+* ogg (requires libvorbis)
+* flac (requires flac or libsndfile)
+* aiff (requires libsndfile)
+
+
+## API: al_stream_from_file
+
+Loads an audio file from disk as it is needed.  Supports the
+same file types as [al_load_sample].
+
+Unlike regular streams, the one returned by this function
+need not be fed by the user; the library will automatically
+read more of the file as it is needed.  The stream will 
+contain *buffer_count* buffers with *samples* samples.
+
+FLAC streaming is currently unimplemented.
+
+A stream must be attached to a voice to be used.  See
+[ALLEGRO_STREAM] for more details.
+
+## API: al_save_sample
+
+Writes a sample into a file.  Currently, wav is
+the only supported format, and the extension
+must be 'wav'.
+
+Returns true on success, false on error.
+
diff -Nur ./docsA/src/refman/inc.a.txt ./docsB/src/refman/inc.a.txt
--- ./docsA/src/refman/inc.a.txt	2009-02-19 22:13:21.000000000 -0500
+++ ./docsB/src/refman/inc.a.txt	2009-02-19 22:04:13.000000000 -0500
@@ -23,6 +23,7 @@
 * [Timer](timer.html)
 * [UTF-8](utf8.html)
 * [Audio addon](kcm_audio.html)
+* [Audio codecs](acodec.html)
 * [Color addon](color.html)
 * [Font addons](font.html)
 * [Image I/O addon](iio.html)
diff -Nur ./docsA/src/refman/index.txt ./docsB/src/refman/index.txt
--- ./docsA/src/refman/index.txt	2009-02-19 22:13:21.000000000 -0500
+++ ./docsB/src/refman/index.txt	2009-02-19 22:04:13.000000000 -0500
@@ -25,6 +25,7 @@
 # Addons
 
 * [Audio addon](kcm_audio.html)
+* [Audio codecs](acodec.html)
 * [Color addon](color.html)
 * [Font addons](font.html)
 * [Image I/O addon](iio.html)


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/