[vlc-devel] How to force audio codec format to VLC_CODEC_F32L?
Peter Tap
ptrtap at yahoo.com
Fri Mar 13 09:57:34 CET 2015
After stepping through each line to see where the format changes, I finally figured out what was going on. The primary problem is that, in modules/audio_output/alsa.c, ALSA API snd_pcm_hw_params_test_format does not like SND_PCM_FORMAT_FLOAT. Hence, the format was being changed to integer. I don't understand why the ALSA API fails.
My workaround was to define my own ALSA settings in .asoundrc. However, there is yet another bug in VLC. When you look at the list of devices from the preferences, you do not see the custom names from .asoundrc. I had to manually edit vlcrc configuration file and define my custom name for alsa device.
Once I started to use my custom setting from .asoundrc, things started to work as expected.
So there it is. Two bugs. One in ALSA api and the second in VLC preferences UI.
I can easily reproduce the problem. If there is anything you would like me to test, please let me know.
Regards,Peter
On Thursday, March 12, 2015 1:32 PM, Peter Tap <ptrtap at yahoo.com> wrote:
Can someone please help? I would appreciate any information that you can provide or point me to what I must debug.
Regards,Peter
On Thursday, March 12, 2015 1:01 AM, Peter Tap <ptrtap at yahoo.com> wrote:
Folks,
I have been trying to chase down a problem with audio distortion with VLC 2.1.5 code base. It happens only when the volume gain is changed from its default value of 100%.
The problem machine is an Ubuto 14.04 box with Openbox (no Unity). The audio driver is pure ALSA. There is no pulse audio. Audio output is six channels through a Soundblaster compatible card.
After going through VLC logs, I finally figured out that libsamplerate was being ignored although it was found. Today, I added some msg_Dbg statements in OpenRampler method of audio_filter/resampler/src.c and here is what I discovered:
Method OpenRampler first checks if the audio format is VLC_CODEC_FL32L. If not, it simply returns a generic error code.
On the machine where I have the problem, the audio format is reported as VLC_CODEC_S32L.
On another machine where I don't see the problem, the audio format is reported as VLC_CODEC_F32L for the same input file.
I am wondering if you can guide me in understanding where this problem is. It doesn't seem to be ALSA configuration issue as all the six speakers work as expected when the volume is set to 100%.
Thank you in advance for your help.
Regards,
Peter
PS: I haven't had this problem with previous versions of VLC.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150313/21b5c2ab/attachment.html>
More information about the vlc-devel
mailing list