Search
lxdream.org :: lxdream/src/aica/audio.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/aica/audio.h
changeset 1024:c67f2d61ab97
prev759:f16975739abc
next1089:a3984d242909
author nkeynes
date Sat Jun 13 00:50:48 2009 +0000 (14 years ago)
permissions -rw-r--r--
last change Build drivers with library dependencies as shared objects (ie plugins)
file annotate diff log raw
1.1 --- a/src/aica/audio.h Mon Jul 21 01:01:39 2008 +0000
1.2 +++ b/src/aica/audio.h Sat Jun 13 00:50:48 2009 +0000
1.3 @@ -22,6 +22,7 @@
1.4 #include <stdio.h>
1.5 #include <glib/gtypes.h>
1.6 #include "gettext.h"
1.7 +#include "plugin.h"
1.8
1.9 #ifdef __cplusplus
1.10 extern "C" {
1.11 @@ -75,8 +76,9 @@
1.12 } *audio_buffer_t;
1.13
1.14 typedef struct audio_driver {
1.15 - char *name;
1.16 - char *description;
1.17 + const char *name;
1.18 + const char *description;
1.19 + int priority; /* Lower == higher priority */
1.20 uint32_t sample_rate;
1.21 uint32_t sample_format;
1.22 gboolean (*init)( );
1.23 @@ -107,6 +109,21 @@
1.24 audio_driver_t audio_init_driver( const char *preferred_driver );
1.25
1.26 /**
1.27 + * Add a new audio driver to the available drivers list
1.28 + */
1.29 +gboolean audio_register_driver( audio_driver_t driver );
1.30 +
1.31 +/**
1.32 + * Signal the audio driver that playback is beginning
1.33 + */
1.34 +void audio_start_driver();
1.35 +
1.36 +/**
1.37 + * Signal the audio driver that playback is stopping
1.38 + */
1.39 +void audio_stop_driver();
1.40 +
1.41 +/**
1.42 * Mark the current write buffer as full and prepare the next buffer for
1.43 * writing. Returns the next buffer to write to.
1.44 * If all buffers are full, returns NULL.
.