[vlc-devel] [PATCH 1/5] wasapi: refactor
Thomas Guillem
thomas at gllm.fr
Thu Oct 24 14:37:09 CEST 2019
Handle spdif and hdmi in the same code block.
No functional changes.
---
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 66cfee466ca..70284f41aaf 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);
--
2.20.1
More information about the vlc-devel
mailing list