Displaying 8 results from an estimated 8 matches for "ao_sample_format".
2013 Nov 07
2
Workaround for (EL6.4) rdesktop-1.6.0-10 Woe
...NT_H=1 -DSTAT_STATVFS=1
-DHAVE_STRUCT_STATVFS_F_NAMEMAX=1 -DHAVE_STRUCT_STATFS_F_NAMELEN=1
-DHAVE_MNTENT_H=1 -DHAVE_SETMNTENT=1 -DIPv6=1 -DKEYMAP_PATH=
\"/usr/share/rdesktop/keymaps/\" -o orders.o -c orders.c
rdpsnd_libao.c: In function 'libao_open':
rdpsnd_libao.c:78: error: 'ao_sample_format' has no member named
'matrix'
rdpsnd_libao.c: In function 'libao_set_format':
rdpsnd_libao.c:117: error: 'ao_sample_format' has no member named
'matrix'
make: *** [rdpsnd_libao.o] Error 1
make: *** Waiting for unfinished jobs....
error: Bad exit status from /var/...
2013 Dec 04
1
endian problems with AIFF and WAV
...confused as to why the solution
works. Would someone please explain this to me so I don't trip over this
again later in my project?
I used sf_open_fd() to get a SNDFILE* pointer and an AF_INFO struct. In
that struct I find out what bit resolution the samples are. I put that
number into ao_sample_format format.bits, fill a buffer using
sf_read_int() and then call ao_play(). Doing this with a file containing
8-bit samples, the result was the file playing at at half-pitch and twice
as long as normal. But, if I manually plug in format.bits = 32, the files
play fine.
Here's the program:
/*...
2002 Jan 02
2
macosx (lots of little changes)
...t;);
}
I was getting segfaults using NULL instead of the dummy variable.
--- ogg123/callbacks.c.orig Wed Jan 2 01:25:13 2002
+++ ogg123/callbacks.c Tue Jan 1 18:14:29 2002
@@ -40,10 +40,11 @@
audio_reopen_arg_t *reopen_arg = (audio_reopen_arg_t *) arg;
audio_device_t *current;
ao_sample_format format;
+ int dummy_o;
/* We DO NOT want to get cancelled part way through this and have our
audio devices in an unknown state */
- pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
+ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &dummy_o);
<p> close_audio_devices...
2002 Jan 02
2
macosx (lots of little changes)
...t;);
}
I was getting segfaults using NULL instead of the dummy variable.
--- ogg123/callbacks.c.orig Wed Jan 2 01:25:13 2002
+++ ogg123/callbacks.c Tue Jan 1 18:14:29 2002
@@ -40,10 +40,11 @@
audio_reopen_arg_t *reopen_arg = (audio_reopen_arg_t *) arg;
audio_device_t *current;
ao_sample_format format;
+ int dummy_o;
/* We DO NOT want to get cancelled part way through this and have our
audio devices in an unknown state */
- pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
+ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &dummy_o);
<p> close_audio_devices...
2013 Jun 03
0
libao on Debian
...; // 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_FAILURE) ;
}
fmt.bits...
2002 Apr 11
1
libao: IRIX patch
...ion 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_internal *) device->internal;
- ALpv params[2];
+ ALpv params;
int dev = AL_DEFAULT_OUTPUT;
int wsize = AL_SAMPLE_16;
-
- internal->nChannels = channels;
-
- if (alSetQueueSize(internal->alconfig, BUFFER_SIZE)...
2008 Dec 08
0
sndio support for libao
..._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_sample_format *format)
+{
+ struct sio_hdl *hdl = (struct sio_hdl *)device->internal;
+ struct sio_par par;
+
+ sio_initpar(&par);
+ par.sig = 1;
+ par.le = SIO_LE_NATIVE;
+ par.bits = format->bits;
+ par.rate = format->rate;
+ par.pchan = format->channels;
+ if (!sio_setpar(hdl, &par))
+ re...
2009 Oct 06
0
[ao] Two patches for libao2
...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) {
> if (!funcs->set_option(device, options-&...