From 0bd49a14320a205abd7300abbd6003b4cf7276d8 Mon Sep 17 00:00:00 2001 From: LACARRIERE Jerome Date: Wed, 28 Mar 2012 14:52:12 +0300 Subject: add access to audio engine gap --- src/xine-engine/audio_out.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 4b2398bef..1a2e8aa5c 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -280,6 +280,8 @@ typedef struct { sXYData eq_data_history[EQ_BANDS][EQ_CHANNELS]; + int last_gap; + } aos_t; struct audio_fifo_s { @@ -1166,6 +1168,7 @@ static void *ao_loop (void *this_gen) { * calculate gap: */ gap = in_buf->vpts - hw_vpts; + this->last_gap = gap; lprintf ("hw_vpts : %" PRId64 " buffer_vpts : %" PRId64 " gap : %" PRId64 "\n", hw_vpts, in_buf->vpts, gap); @@ -1828,6 +1831,10 @@ static int ao_get_property (xine_audio_port_t *this_gen, int property) { ret = this->current_speed; break; + case AO_PROP_DRIVER_DELAY: + ret = this->last_gap; + break; + default: inc_num_driver_actions(this); pthread_mutex_lock( &this->driver_lock ); -- cgit v1.2.3