[vlc-commits] wasapi: fix buffer_duration for hdmi formats
Thomas Guillem
git at videolan.org
Fri Oct 7 12:10:17 CEST 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Oct 5 16:54:44 2016 +0200| [92c154dcf2d2f764a3c22ae5d1d5a5b8670d217e] | committer: Thomas Guillem
wasapi: fix buffer_duration for hdmi formats
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=92c154dcf2d2f764a3c22ae5d1d5a5b8670d217e
---
modules/audio_output/wasapi.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/audio_output/wasapi.c b/modules/audio_output/wasapi.c
index 93303e2..b49f0ed 100644
--- a/modules/audio_output/wasapi.c
+++ b/modules/audio_output/wasapi.c
@@ -469,9 +469,12 @@ static HRESULT Start(aout_stream_t *s, audio_sample_format_t *restrict pfmt,
{
vlc_HdmiToWave(&wf_iec61937, &fmt);
shared_mode = AUDCLNT_SHAREMODE_EXCLUSIVE;
+
/* Less buffer duration for these very high sample rate codecs
- * (IAudioClient_Initialize return an out of memory error if higher) */
- buffer_duration = AOUT_MAX_PREPARE_TIME * 5;
+ * (IAudioClient_Initialize return an out of memory error if higher).
+ * It seems that the max buffer size for EXCLUSIVE/HDMI is 1MB (there
+ * is no such limitation for PCM). */
+ buffer_duration = CLOCK_FREQ * 10 * 1024 * 1024 / pwf->nAvgBytesPerSec;
}
else
{
More information about the vlc-commits
mailing list