Skip to content
Snippets Groups Projects
Commit cd7b25d4 authored by Jack Moffitt's avatar Jack Moffitt
Browse files

Stan Seibert's ao_raw device.

git-svn-id: http://svn.xiph.org/trunk/ao@1440 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent 904cfac0
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,18 @@ data you output.
"file" - Sets the output file. By default, this is
"output.wav".
raw
---
Raw sample output. Writes the sound data to disk in uncompressed,
headerless form using the byte order specified.
Option keys:
"file" - Sets the output file. Use "-" if you want to write
to stdout. By default this is "output.raw".
"byteorder" - Sets the byte order used in the output. Use
"native" for native machine byte order, "big" for
big-endian order, and "little" for little-endian order. By
default this is "native".
ADDING NEW DRIVERS
......
......@@ -75,6 +75,7 @@ typedef struct ao_device_s {
#define AO_NULL 0
#define AO_WAV 1
#define AO_RAW 2
/* --- Functions --- */
......
......@@ -7,7 +7,7 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/include
lib_LTLIBRARIES = libao.la
libao_la_SOURCES = audio_out.c ao_wav.c ao_null.c
libao_la_SOURCES = audio_out.c ao_raw.c ao_wav.c ao_null.c
libao_la_LDFLAGS = -version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@
......
......@@ -55,6 +55,7 @@ typedef struct driver_tree_s {
extern ao_functions_t ao_null;
extern ao_functions_t ao_wav;
extern ao_functions_t ao_raw;
driver_tree_t *driver_head = NULL;
......@@ -97,6 +98,7 @@ void ao_initialize(void)
{
driver_tree_t *dnull;
driver_tree_t *dwav;
driver_tree_t *draw;
driver_tree_t *plugin;
driver_tree_t *driver;
DIR *plugindir;
......@@ -114,12 +116,16 @@ void ao_initialize(void)
dwav = (driver_tree_t *)malloc(sizeof(driver_tree_t));
dwav->functions = &ao_wav;
dwav->handle = NULL;
draw = (driver_tree_t *)malloc(sizeof(driver_tree_t));
draw->functions = &ao_raw;
draw->handle = NULL;
dnull->next = dwav;
dwav->next = NULL;
dwav->next = draw;
draw->next = NULL;
driver_head = dnull;
driver = dwav;
driver = draw;
/* now insert any plugins we find */
plugindir = opendir(AO_PLUGIN_PATH);
......@@ -151,7 +157,7 @@ void ao_shutdown(void)
if (!driver_head) return;
/* unload and free all the plugins */
driver = driver->next->next;
driver = driver->next->next->next; /* Skip null, wav, and raw driver */
while (driver) {
if (driver->functions) free(driver->functions);
if (driver->handle) dlclose(driver->handle);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment