[vlc-commits] auhal: towards working S/PDIF output

David Fuhrmann git at videolan.org
Wed Mar 6 20:30:45 CET 2013


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Wed Mar  6 20:23:24 2013 +0100| [2ab46404f8c9b359c377c3a23a9a0fb07a2b52fa] | committer: David Fuhrmann

auhal: towards working S/PDIF output

Now, S/PDIF works at least in the sense that it plays something which "seems"
to be in sync more or less.

refs #8083

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

 modules/audio_output/auhal.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index 353096d..15d053c 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -305,6 +305,11 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
         p_aout->play = Play;
         p_aout->flush = Flush;
         p_aout->time_get = TimeGet;
+
+        // TODO fix TimeGet for S/PDIF
+        if (AOUT_FMT_SPDIF (fmt) && p_sys->b_selected_dev_is_digital)
+            p_aout->time_get = NULL;
+
         p_aout->pause = Pause;
         return VLC_SUCCESS;
     }
@@ -849,6 +854,11 @@ static int StartSPDIF (audio_output_t * p_aout, audio_sample_format_t *fmt)
         return false;
     }
 
+    /* setup circular buffer */
+    TPCircularBufferInit(&p_sys->circular_buffer, kBufferLength);
+    p_sys->i_played_length = 0;
+    p_sys->i_last_sample_time = 0;
+
     return true;
 }
 



More information about the vlc-commits mailing list