Force VLC audio ouput in case of sample rate mismatch

*nix specific usage questions
aCOSwt
New Cone
New Cone
Posts: 5
Joined: 14 Jun 2011 09:56
Operating System: Gentoo-Linux

Force VLC audio ouput in case of sample rate mismatch

Postby aCOSwt » 15 Apr 2022 12:18

Hello,

Using VLC 3.0.16 under KDE-Plasma 5.23.5 (Pulseaudio-free) under Linux 5.4 + in kernel alsa drivers + MAUDIO DELTA 24/96 sound card. (Timer rate defaults to 48k but not blocked)

VLC sound output set to alsa default, being presently configured of type plug with some slave pcm of type dmix (which is capable of automatic resampling in case of mismatch)

Moreover, my sound card is equipped with an hardware mixer also capable of resampling in case of sample rates mismatches.

However, if I set VLC's resampling option to no resampling, (expecting the resampling on behalf of downstream), VLC won't output any sound when asked to play whatever audio stream sampled at whatever frequency different from 48KHz.

Of course, I'd prefer resampling being made by my audio card (in order to save precious CPU cycles) therefore :

A/ Is there a way to instruct VLC to output audio irrespective of possible sample rate mismatches ?

B/ In case of definitely negative answer to A, how is (what syscalls make) VLC aware of sample rate mismatches ? Could this just be workarounded by some particular .ctl alsa setting ?

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Force VLC audio ouput in case of sample rate mismatch

Postby Rémi Denis-Courmont » 17 Apr 2022 09:39

A/ VLC always tries that first and falls back to resampling only if the output requires it.
B/ N.A.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

aCOSwt
New Cone
New Cone
Posts: 5
Joined: 14 Jun 2011 09:56
Operating System: Gentoo-Linux

Re: Force VLC audio ouput in case of sample rate mismatch

Postby aCOSwt » 18 Apr 2022 10:36

Merci Rémi d'avoir répondu.
VLC always tries that first and falls back to resampling only if the output requires it.
Can I continue as follows : and won't output anything if resampling (in VLC settings) is forced to no. ?

Hence my question : Is there a way to force VLC to output even if backend requires a different sample rate and in-VLC resampling not allowed ?

BTW, how is VLC aware of backend's requirements in terms of sampling rate.
I understand how it can be aware of some hardware device sampling rate settings but when VLC's is set to output audio on some Alsa virtual device… :?:

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Force VLC audio ouput in case of sample rate mismatch

Postby Rémi Denis-Courmont » 18 Apr 2022 10:41

I don't understand what you expect. VLC negotiates a format with ALSA. If they can't agree, then that's that.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 4 guests