[vlc-devel] [PATCH 2/4] mmdevice: use audio.i_profile for dtshd detection
Thomas Guillem
thomas at gllm.fr
Fri Mar 30 15:15:23 CEST 2018
---
modules/audio_output/mmdevice.c | 2 +-
modules/audio_output/wasapi.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index 03e96e2f37..178070f508 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -1137,7 +1137,7 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
if (b_hdmi)
return -1;
else if (fmt->i_format == VLC_CODEC_DTS)
- var_SetBool(aout, "dtshd", false );
+ fmt->i_profile = 0; /* force DTS Core */
/* falltrough */
case MM_PASSTHROUGH_ENABLED_HD:
break;
diff --git a/modules/audio_output/wasapi.c b/modules/audio_output/wasapi.c
index ada493b56b..62d486031f 100644
--- a/modules/audio_output/wasapi.c
+++ b/modules/audio_output/wasapi.c
@@ -471,7 +471,7 @@ static HRESULT Start(aout_stream_t *s, audio_sample_format_t *restrict pfmt,
if (fmt.i_format == VLC_CODEC_DTS)
{
- b_dtshd = var_GetBool(s->obj.parent, "dtshd");
+ b_dtshd = pfmt->i_profile > 0;
if (b_dtshd)
{
b_hdmi = true;
@@ -544,7 +544,7 @@ static HRESULT Start(aout_stream_t *s, audio_sample_format_t *restrict pfmt,
"fallback to 48kHz (S/PDIF) (error 0x%lx)", hr);
IAudioClient_Release(sys->client);
free(sys);
- var_SetBool(s->obj.parent, "dtshd", false);
+ pfmt->i_profile = 0; /* Force DTS core */
return Start(s, pfmt, sid);
}
msg_Err(s, "cannot negotiate audio format (error 0x%lx)%s", hr,
--
2.11.0
More information about the vlc-devel
mailing list