summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xine/audio_out.h3
-rw-r--r--src/xine-engine/audio_out.c7
2 files changed, 9 insertions, 1 deletions
diff --git a/include/xine/audio_out.h b/include/xine/audio_out.h
index dd7d16a0d..ebd5a9097 100644
--- a/include/xine/audio_out.h
+++ b/include/xine/audio_out.h
@@ -343,7 +343,8 @@ int _x_ao_channels2mode( int channels ) XINE_PROTECTED;
#define AO_PROP_CLOCK_SPEED 20 /* inform audio_out that speed has changed */
#define AO_PROP_BUFS_TOTAL 21 /* read-only */
#define AO_PROP_BUFS_FREE 22 /* read-only */
-#define AO_NUM_PROPERTIES 23
+#define AO_PROP_DRIVER_DELAY 23 /* read-only */
+#define AO_NUM_PROPERTIES 24
/* audio device control ops */
#define AO_CTRL_PLAY_PAUSE 0
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 );