Displaying 7 results from an estimated 7 matches for "ao_device".
2008 Dec 08
0
sndio support for libao
...no options */
+ 0 /* zero options */
+};
+
+int ao_plugin_test()
+{
+ struct sio_hdl *hdl;
+
+ hdl = sio_open(NULL, SIO_PLAY, 0);
+ if (hdl == NULL)
+ return 0;
+ sio_close(hdl);
+ return 1;
+}
+
+ao_info *ao_plugin_driver_info(void)
+{
+ return &ao_sndio_info;
+}
+
+int ao_plugin_device_init(ao_device *device)
+{
+ struct sio_hdl *hdl;
+
+ hdl = sio_open(NULL, SIO_PLAY, 0);
+ if (hdl == NULL)
+ return 0;
+ device->internal = hdl;
+ return 1;
+}
+
+int ao_plugin_set_option(ao_device *device, const char *key, const char *value)
+{
+ return 1;
+}
+
+int ao_plugin_open(ao_device *device, ao_samp...
2002 Apr 11
1
libao: IRIX patch
...alNewConfig();
-
+ internal->alport = NULL;
+ internal->bytesPerSample = 2;
+ internal->channels = 2;
+
device->internal = internal;
- return 1; /* Memory alloc successful */
+ /* Device-specific initialization was successful. */
+ return 1;
}
-
int ao_plugin_set_option(ao_device *device, const char *key, const char *value)
{
return 1; /* No options */
}
-
-/*
- * open the audio device for writing to
- */
+/* Open the audio device for writing. */
int ao_plugin_open(ao_device *device, ao_sample_format *format)
{
ao_irix_internal *internal = (ao_irix_i...
2004 Oct 22
0
libao-0.8.5 patch
...ibao-0.8.5.new/src/ao_au.c 2004-10-22 13:05:56.000000000 +0200
@@ -71,6 +71,7 @@
"au",
"Wil Mahan <wtm2@duke.edu>",
"Sends output to a .au file",
+ "au",
AO_FMT_BIG,
0,
NULL, /* No options */
@@ -115,7 +116,12 @@
static int ao_au_set_option(ao_device *device, const char *key,
const char *value)
{
- return 1; /* No options! */
+ if (!strcmp(key, "file"))
+ ;
+ else
+ return 0; /* No options! */
+
+ return 1;
}
diff -ur libao-0.8.5/src/ao_null.c libao-0.8.5.new/src/ao_null.c
--- libao-0.8.5/src/ao_null.c 2001-12-18...
2013 Jun 03
0
libao on Debian
...d)
{
int sr = 44100 ; // samples per second
int nchan = 1 ; // number of channels of sound
double dur = 3 ; // duration in seconds
char *sound ;
int nBytes ;
extern char *Sine(int sr, int nchan, double dur, int *nBytes) ;
int r, id ;
ao_device *device ;
ao_sample_format fmt ;
sound = Sine(sr, nchan, dur, &nBytes) ; // create sine tone(s)
ao_initialize() ;
if ( ( id = ao_default_driver_id() < 0 ) ) {
fprintf(stderr,"Error in ao_default_driver(): id = %d\n", id) ;
exit(EXIT_F...
2002 Jul 27
0
libao patch
...at Apr 20 21:41:39 2002
@@ -90,17 +90,33 @@
return &ao_alsa_info;
}
+static int get_alsa_environment_buf_size(void)
+{
+ char * buf;
+
+ buf = getenv("AO_ALSA_BUFFER_SIZE");
+ if (buf == NULL)
+ return 0;
+ else
+ return strtol(buf, NULL, 10);
+}
int ao_plugin_device_init(ao_device *device)
{
ao_alsa_internal *internal;
+ int buf_size_env;
internal = (ao_alsa_internal *) malloc(sizeof(ao_alsa_internal));
- if (internal == NULL)
+ if (internal == NULL)
return 0; /* Could not initialize device memory */
- internal->buf_size = AO_ALSA_BUF_SIZE;
+ buf_size_env...
2013 Dec 04
1
endian problems with AIFF and WAV
...he files
play fine.
Here's the program:
/* compile with "gcc -o foo foo.c -lao -ldl -lm -lsndfile" */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <ao/ao.h>
#include <sndfile.h>
#include <math.h>
ao_device *device;
ao_sample_format format;
int main(int argc, char *argv[])
{
int default_driver;
int frames_read;
int *buffer;
SNDFILE *sndfile;
SF_INFO sf_info;
FILE *fp;
if (argc != 2) {
printf("usage: %s <filename>\n", argv[0]);
exit(1);...
2009 Oct 06
0
[ao] Two patches for libao2
...tions *static_drivers[] = {
>
> static driver_list *driver_head = NULL;
> static ao_config config = {
> - NULL /* default_driver */
> + NULL, /* default_driver */
> + NULL, /* options */
> };
>
> static ao_info **info_table = NULL;
> @@ -501,7 +502,10 @@ static ao_device* _open_device(int driver_id, ao_sample_format *format,
> errno = AO_EFAIL;
> return NULL; /* Couldn't init internal memory */
> }
> -
> +
> + if (options == NULL)
> + options = config.options;
> +
> /* Load options */
> while (options != NULL) {
>...