[vlc-commits] mmdevice: pass play date to streams

Thomas Guillem git at videolan.org
Mon Oct 7 10:35:13 CEST 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Sep 27 17:02:53 2019 +0200| [fd04c9b2fa86db97dde764a96d9f612b62d57e4f] | committer: Thomas Guillem

mmdevice: pass play date to streams

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fd04c9b2fa86db97dde764a96d9f612b62d57e4f
---

 modules/audio_output/directsound.c | 3 ++-
 modules/audio_output/mmdevice.c    | 3 +--
 modules/audio_output/mmdevice.h    | 7 ++++---
 modules/audio_output/wasapi.c      | 3 ++-
 4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/modules/audio_output/directsound.c b/modules/audio_output/directsound.c
index 8e1ae24bba..f4d7efea6d 100644
--- a/modules/audio_output/directsound.c
+++ b/modules/audio_output/directsound.c
@@ -294,8 +294,9 @@ static HRESULT Play( vlc_object_t *obj, aout_stream_sys_t *sys,
     return dsresult;
 }
 
-static HRESULT StreamPlay( aout_stream_t *s, block_t *block )
+static HRESULT StreamPlay( aout_stream_t *s, block_t *block, vlc_tick_t date )
 {
+    (void) date;
     return Play( VLC_OBJECT(s), s->sys, block );
 }
 
diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index cb05f46597..07381c7ae2 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -141,11 +141,10 @@ static void Play(audio_output_t *aout, block_t *block, vlc_tick_t date)
     HRESULT hr;
 
     EnterMTA();
-    hr = aout_stream_Play(sys->stream, block);
+    hr = aout_stream_Play(sys->stream, block, date);
     LeaveMTA();
 
     vlc_FromHR(aout, hr);
-    (void) date;
 }
 
 static void Pause(audio_output_t *aout, bool paused, vlc_tick_t date)
diff --git a/modules/audio_output/mmdevice.h b/modules/audio_output/mmdevice.h
index 4d34d20b3d..65e41de4d4 100644
--- a/modules/audio_output/mmdevice.h
+++ b/modules/audio_output/mmdevice.h
@@ -38,7 +38,7 @@ struct aout_stream
 
     void (*stop)(aout_stream_t *);
     HRESULT (*time_get)(aout_stream_t *, vlc_tick_t *);
-    HRESULT (*play)(aout_stream_t *, block_t *);
+    HRESULT (*play)(aout_stream_t *, block_t *, vlc_tick_t);
     HRESULT (*pause)(aout_stream_t *, bool);
     HRESULT (*flush)(aout_stream_t *);
 
@@ -71,9 +71,10 @@ static inline HRESULT aout_stream_TimeGet(aout_stream_t *s, vlc_tick_t *delay)
     return (s->time_get)(s, delay);
 }
 
-static inline HRESULT aout_stream_Play(aout_stream_t *s, block_t *block)
+static inline HRESULT aout_stream_Play(aout_stream_t *s, block_t *block,
+                                       vlc_tick_t date)
 {
-    return (s->play)(s, block);
+    return (s->play)(s, block, date);
 }
 
 static inline HRESULT aout_stream_Pause(aout_stream_t *s, bool paused)
diff --git a/modules/audio_output/wasapi.c b/modules/audio_output/wasapi.c
index c479f8b5bd..99506c6ef1 100644
--- a/modules/audio_output/wasapi.c
+++ b/modules/audio_output/wasapi.c
@@ -140,8 +140,9 @@ static HRESULT TimeGet(aout_stream_t *s, vlc_tick_t *restrict delay)
     return hr;
 }
 
-static HRESULT Play(aout_stream_t *s, block_t *block)
+static HRESULT Play(aout_stream_t *s, block_t *block, vlc_tick_t date)
 {
+    (void) date;
     aout_stream_sys_t *sys = s->sys;
     void *pv;
     HRESULT hr;



More information about the vlc-commits mailing list