vlc | branch: master | Thomas Guillem <[email protected]> | 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 { _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
