Page 1 of 1

Switching real-time between bitstream and PCM?

Posted: 14 Jul 2017 19:42
by mrblue1234
All,

1.) When playing a video with VLC (2.2.5.1) is is possible to use bitstream (pass-through mode) and then switch over to Linear PCM without stopping the video?

2.) There is an audio setting "Use S/PDIF when available". Is it possible to toggle this setting during playback to toggle between bitstream and Linear PCM without stopping the video? Is there a hotkey that will do this?

3.) LibVLC has a function called libvlc_audio_output_set_device_type() that looks like it controls this field but is now depreciated. How can I toggle this field with the API interface via LibVLC?

https://www.videolan.org/developers/vlc ... 9729fd8ee1

Thank you.

-Mike

Re: Switching real-time between bitstream and PCM?

Posted: 16 Jul 2017 14:09
by Rémi Denis-Courmont
1) Yes, PulseAudio format loss is implemented by VLC. Obviously, you need PulseAudio. It won't work with ALSA or custom callbacks.
2) No, and that setting is anyway ignored by the PulseAudio output.
3) You shouldn't use that API. Ever.

Re: Switching real-time between bitstream and PCM?

Posted: 18 Jul 2017 00:10
by mrblue1234
Hello Remi. Thanks for the post.

1.) I do have PulseAudio installed and I see "PulseAudio Sound Server" as an audio output device from the VLC GUI.

2.) Using the "PulseAudio Sound Server" output device from within VLC, I am able to play a file and I get bitstream coming out via HDMI.

3.) While this is playing (bitstream) I want to which over to PCM. How do I do this now? I don't see any settings for the Pulse Audio Server that stand out to me. Shouldn't this be toggled by the player (VLC?). I am not sure how to do this.

Thank you!

-Mike

Re: Switching real-time between bitstream and PCM?

Posted: 18 Jul 2017 14:08
by Rémi Denis-Courmont
1) So you're using ALSA to render and it won't work like you ask.

Re: Switching real-time between bitstream and PCM?

Posted: 18 Jul 2017 18:25
by mrblue1234
Is there another approach to get this to work?

Thank you.

Re: Switching real-time between bitstream and PCM?

Posted: 19 Jul 2017 13:04
by Rémi Denis-Courmont
No.

Re: Switching real-time between bitstream and PCM?

Posted: 19 Jul 2017 18:18
by mrblue1234
Thank you for the posts Remi. I think this thread is closed now. :)