[vlc-commits] wasapi: refactor

Thomas Guillem git at videolan.org
Tue Nov 26 15:30:12 CET 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Oct 23 11:26:49 2019 +0200| [b49ee904afc1b7209205a67f21d4ddf6df6f6637] | committer: Thomas Guillem

wasapi: refactor

Handle spdif and hdmi in the same code block.

No functional changes.

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

 modules/audio_output/wasapi.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/modules/audio_output/wasapi.c b/modules/audio_output/wasapi.c
index 66cfee466c..70284f41aa 100644
--- a/modules/audio_output/wasapi.c
+++ b/modules/audio_output/wasapi.c
@@ -601,16 +601,14 @@ static HRESULT Start(aout_stream_t *s, audio_sample_format_t *restrict pfmt,
     }
     sys->client = pv;
 
-    if (b_spdif)
-    {
-        vlc_SpdifToWave(pwfe, &fmt);
-        shared_mode = AUDCLNT_SHAREMODE_EXCLUSIVE;
-        /* The max buffer duration in exclusive mode is 200ms */
-        buffer_duration = MSFTIME_FROM_MS(200);
-    }
-    else if (b_hdmi)
+
+    if (b_spdif || b_hdmi)
     {
-        vlc_HdmiToWave(&wf_iec61937, &fmt);
+        if (b_spdif)
+            vlc_SpdifToWave(pwfe, &fmt);
+        else
+            vlc_HdmiToWave(&wf_iec61937, &fmt);
+
         shared_mode = AUDCLNT_SHAREMODE_EXCLUSIVE;
         /* The max buffer duration in exclusive mode is 200ms */
         buffer_duration = MSFTIME_FROM_MS(200);



More information about the vlc-commits mailing list