diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-08-24 01:05:30 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-08-24 01:05:30 +0000 |
commit | 78be10fff9258917b01d713eed3a91dfac4b45e2 (patch) | |
tree | 07163dc8cdac909e342b16fa7e321d9da74826b5 /src/audio_out/audio_arts_out.c | |
parent | 572a2ac889e9dd705a4b8243038fb8d44b4a7a6b (diff) | |
download | xine-lib-78be10fff9258917b01d713eed3a91dfac4b45e2.tar.gz xine-lib-78be10fff9258917b01d713eed3a91dfac4b45e2.tar.bz2 |
fixed esd / gap support (configureable), coding style enforcement
CVS patchset: 475
CVS date: 2001/08/24 01:05:30
Diffstat (limited to 'src/audio_out/audio_arts_out.c')
-rw-r--r-- | src/audio_out/audio_arts_out.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/audio_out/audio_arts_out.c b/src/audio_out/audio_arts_out.c index e92bc7e9c..0bf7c5f90 100644 --- a/src/audio_out/audio_arts_out.c +++ b/src/audio_out/audio_arts_out.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_arts_out.c,v 1.3 2001/08/23 19:36:41 jcdutton Exp $ + * $Id: audio_arts_out.c,v 1.4 2001/08/24 01:05:30 guenter Exp $ */ /* required for swab() */ @@ -81,13 +81,13 @@ static int ao_arts_open(ao_driver_t *this_gen, if ( (mode & this->capabilities) == 0 ) { printf ("audio_arts_out: unsupported mode %08x\n", mode); - return -1; + return 0; } if (this->audio_stream) { if ( (mode == this->mode) && (rate == this->sample_rate) ) - return 1; + return this->sample_rate; arts_close_stream(this->audio_stream); } @@ -121,7 +121,7 @@ static int ao_arts_open(ao_driver_t *this_gen, printf ("audio_arts_out : latency %d ms\n", this->latency); - return 1; + return this->sample_rate; } @@ -134,7 +134,12 @@ static int ao_arts_num_channels(ao_driver_t *this_gen) static int ao_arts_bytes_per_frame(ao_driver_t *this_gen) { arts_driver_t *this = (arts_driver_t *) this_gen; - return this->bytes_per_frame; + return this->bytes_per_frame; +} + +static int ao_arts_get_gap_tolerance (ao_driver_t *this_gen) +{ + return GAP_TOLERANCE; } static int ao_arts_write(ao_driver_t *this_gen, int16_t *data, @@ -157,8 +162,10 @@ static int ao_arts_delay (ao_driver_t *this_gen) get the current buffer utilization. This is, at best, a very roughly aproximation. */ - return this->latency * this->sample_rate / 1000; -// return 0; + + return arts_stream_get (this->audio_stream, ARTS_P_TOTAL_LATENCY) * this->sample_rate / 1000; + +/* return this->latency * this->sample_rate / 1000; */ } static void ao_arts_close(ao_driver_t *this_gen) @@ -261,7 +268,8 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) { this->ao_driver.write = ao_arts_write; this->ao_driver.close = ao_arts_close; this->ao_driver.exit = ao_arts_exit; - + this->ao_driver.get_gap_tolerance = ao_arts_get_gap_tolerance; + return &this->ao_driver; } |