Wrong VLC volume at launch after calling alsa-lib

This forum is about all development around libVLC.
computer007
New Cone
New Cone
Posts: 3
Joined: 10 Apr 2014 22:55

Wrong VLC volume at launch after calling alsa-lib

Postby computer007 » 10 Apr 2014 23:26

Hello everyone,

I'm not sure to be in the good section, but as my problem is related to calling VLC in a C++ program, I hope it's the right place :).

Here is a brief introduction of the context:
- C++ language,
- The program forks to run VLC in a new process (calling execv),
- The volume is set in the parent process,
- no pulse audio installed,
- Run on raspberry PI.

My problem is that, when calling the alsa library to set the volume before forking and executing VLC, it seems that VLC ignores the previously set volume. However, when I open a second console to run alsamixer, I can see that the volume is properly set.
If a set a low volume, VLC ignores it and plays the sound at an high volume level (but it does not modify the global system volume - I checked this point with alsamixer). At the next call of the alsa-lib (from the parent process), the volume level is properly modified.

So I don't understand why it seems that VLC ignore the system volume level when set before running it (in the forked process), and why it considers it when the system volume is modified later...

The other point puzzuling me is that when I set the volume from the console (with alsamixer) and then run "cvlc", the playback starts with the previously set volume level. That seems to indicate that VLC starts with the current system volume level.

I had a look at the "amixer" source code (which allows setting the volume from console), and my code seems to be identical (same method calls).
In order to see the source code and more informations, I also opened a post on stackoverflow: http://stackoverflow.com/questions/2273 ... g-alsa-lib

Below is the log when running cvlc in verbose mode (same log when run from console or from the program, whereas the volume behaviour is not the same...)

Note: I also tried with the last VLC version (compiled from source code) and there were exactly the same problem.

I would be very gretafull if someone had an idea about the problem. Thank you :)

Code: Select all

Arg 0: cvlc Arg 1: -I Arg 2: dummy Arg 3: -vvv Arg 4: http://streaming.radio.funradio.fr/fun-1-44-128 Arg 5: NULL [0x6f28f0] main libvlc debug: VLC media player - 2.0.3 Twoflower [0x6f28f0] main libvlc debug: Copyright © 1996-2012 VLC authors and VideoLAN [0x6f28f0] main libvlc debug: revision 2.0.2-93-g77aa89e [0x6f28f0] main libvlc debug: configured with ./configure '--enable-static' '--build=arm-linux-gnueabihf' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security' 'LDFLAGS=-Wl,-z,relro' '--config-cache' '--disable-maintainer-mode' '--disable-silent-rules' '--disable-update-check' '--enable-fast-install' '--prefix=/usr' '--docdir=/usr/share/doc/vlc-nox' '--sysconfdir=/etc' '--with-binary-version=5' '--enable-a52' '--enable-aa' '--enable-bluray' '--enable-bonjour' '--enable-caca' '--enable-dbus' '--enable-dca' '--enable-dirac' '--enable-directfb' '--enable-dvbpsi' '--enable-dvdnav' '--enable-faad' '--enable-flac' '--enable-fluidsynth' '--enable-freetype' '--enable-fribidi' '--enable-gnutls' '--enable-jack' '--enable-kate' '--enable-libass' '--enable-libmpeg2' '--enable-libproxy' '--enable-libxml2' '--enable-lirc' '--enable-live555' '--enable-mad' '--enable-mkv' '--enable-mod' '--enable-mpc' '--enable-mtp' '--enable-mux_ogg' '--enable-ncurses' '--enable-notify' '--enable-ogg' '--enable-oss' '--enable-pulse' '--enable-qt4' '--enable-realrtsp' '--enable-samplerate' '--enable-schroedinger' '--enable-sdl' '--enable-shout' '--enable-skins2' '--enable-smb' '--enable-speex' '--enable-svg' '--enable-taglib' '--enable-theora' '--enable-twolame' '--enable-upnp' '--enable-vcd' '--enable-vcdx' '--enable-vorbis' '--enable-x264' '--enable-zvbi' '--with-kde-solid=/usr/share/kde4/apps/solid/actions/' '--disable-dxva2' '--disable-gnomevfs' '--disable-goom' '--disable-portaudio' '--disable-projectm' '--disable-sqlite' '--disable-telx' '--enable-alsa' '--enable-atmo' '--enable-dc1394' '--enable-dv' '--enable-fbosd' '--enable-libva' '--enable-linsys' '--enable-omxil' '--enable-pvr' '--enable-udev' '--enable-v4l2' '--disable-crystalhd' '--disable-mmx' '--disable-sse' '--disable-neon' '--disable-altivec' 'build_alias=arm-linux-gnueabihf' [0x6f28f0] main libvlc debug: searching plug-in modules [0x6f28f0] main libvlc debug: loading plugins cache file /usr/lib/vlc/plugins/plugins.dat [0x6f28f0] main libvlc debug: recursively browsing `/usr/lib/vlc/plugins' [0x6f28f0] main libvlc debug: saving plugins cache /usr/lib/vlc/plugins/plugins.dat [0x6f28f0] main libvlc debug: plug-ins loaded: 410 modules [0x6f28f0] main libvlc debug: opening config file (/home/pi/.config/vlc/vlcrc) [0x6f28f0] main libvlc debug: translation test: code is "en_GB" [0x6f28f0] main libvlc debug: CPU has capabilities FPU [0x6f28f0] main libvlc debug: looking for memcpy module: 1 candidate [0x6f28f0] main libvlc debug: using memcpy module "memcpy" [0x859708] main input debug: Creating an input for 'Media Library' [0x859708] main input debug: Input is a meta file: disabling unneeded options [0x859708] main input debug: using timeshift granularity of 50 MiB, in path '/tmp' [0x859708] main input debug: `file/xspf-open:///home/pi/.local/share/vlc/ml.xspf' gives access `file' demux `xspf-open' path `/home/pi/.local/share/vlc/ml.xspf' [0x859708] main input debug: creating demux: access='file' demux='xspf-open' location='/home/pi/.local/share/vlc/ml.xspf' file='/home/pi/.local/share/vlc/ml.xspf' [0x874590] main demux debug: looking for access_demux module: 3 candidates [0x874590] main demux debug: no access_demux module matching "file" could be loaded [0x874590] main demux debug: TIMER module_need() : 12.291 ms - Total 12.291 ms / 1 intvls (Avg 12.291 ms) [0x859708] main input debug: creating access 'file' location='/home/pi/.local/share/vlc/ml.xspf', path='/home/pi/.local/share/vlc/ml.xspf' [0x704c70] main access debug: looking for access module: 2 candidates [0x704c70] filesystem access debug: opening file `/home/pi/.local/share/vlc/ml.xspf' [0x704c70] main access debug: using access module "filesystem" [0x704c70] main access debug: TIMER module_need() : 4.259 ms - Total 4.259 ms / 1 intvls (Avg 4.259 ms) [0x705b20] main stream debug: Using stream method for AStream* [0x705b20] main stream debug: starting pre-buffering [0x705b20] main stream debug: received first data after 0 ms [0x705b20] main stream debug: pre-buffering done 296 bytes in 0s - 1066 KiB/s [0x8752b8] main stream debug: looking for stream_filter module: 7 candidates [0x8752b8] main stream debug: no stream_filter module matching "any" could be loaded [0x8752b8] main stream debug: TIMER module_need() : 9.213 ms - Total 9.213 ms / 1 intvls (Avg 9.213 ms) [0x8752b8] main stream debug: looking for stream_filter module: 1 candidate [0x8752b8] main stream debug: using stream_filter module "stream_filter_record" [0x8752b8] main stream debug: TIMER module_need() : 2.200 ms - Total 2.200 ms / 1 intvls (Avg 2.200 ms) [0x859708] main input debug: creating demux: access='file' demux='xspf-open' location='/home/pi/.local/share/vlc/ml.xspf' file='/home/pi/.local/share/vlc/ml.xspf' [0x705720] main demux debug: looking for demux module: 1 candidate [0x705720] playlist demux debug: using XSPF playlist reader [0x705720] main demux debug: using demux module "playlist" [0x705720] main demux debug: TIMER module_need() : 3.359 ms - Total 3.359 ms / 1 intvls (Avg 3.359 ms) [0x705d38] main demux meta debug: looking for meta reader module: 2 candidates [0x705d38] lua demux meta debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/reader [0x705d38] lua demux meta debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader [0x705d38] lua demux meta debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac [0x705d38] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader [0x705d38] main demux meta debug: no meta reader module matching "any" could be loaded [0x705d38] main demux meta debug: TIMER module_need() : 31.300 ms - Total 31.300 ms / 1 intvls (Avg 31.300 ms) [0x859708] main input debug: `file/xspf-open:///home/pi/.local/share/vlc/ml.xspf' successfully opened [0x85c450] main xml reader debug: looking for xml reader module: 1 candidate [0x85c450] main xml reader debug: using xml reader module "xml" [0x85c450] main xml reader debug: TIMER module_need() : 8.964 ms - Total 8.964 ms / 1 intvls (Avg 8.964 ms) [0x705720] playlist demux debug: parsed 0 tracks successfully [0x859708] main input debug: EOF reached [0x705720] main demux debug: removing module "playlist" [0x8752b8] main stream debug: removing module "stream_filter_record" [0x704c70] main access debug: removing module "filesystem" [0x859708] main input debug: TIMER input launching for 'Media Library' : 70.566 ms - Total 70.566 ms / 1 intvls (Avg 70.566 ms) [0x705b20] main interface debug: looking for interface module: 1 candidate [0x705b20] main interface debug: using interface module "hotkeys" [0x705b20] main interface debug: TIMER module_need() : 2.954 ms - Total 2.954 ms / 1 intvls (Avg 2.954 ms) [0x859708] main interface debug: looking for interface module: 1 candidate [0x859708] inhibit interface error: Failed to connect to the D-Bus session daemon: /usr/bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed. [0x859708] main interface debug: no interface module matching "inhibit,none" could be loaded [0x859708] main interface debug: TIMER module_need() : 1061.819 ms - Total 1061.819 ms / 1 intvls (Avg 1061.819 ms) [0x859708] main interface error: no suitable interface module [0x77a9a0] main playlist debug: playlist threads correctly activated [0x77a9a0] main playlist debug: adding item `http://streaming.radio.funradio.fr/fun-1-44-128' ( http://streaming.radio.funradio.fr/fun-1-44-128 ) [0x712e40] main interface debug: looking for interface module: 1 candidate [0x77a9a0] main playlist debug: no fetch required for (null) (art currently (null)) [0x77a9a0] main playlist debug: rebuilding array of current - root Playlist [0x77a9a0] main playlist debug: rebuild done - 1 items, index -1 [0x712e40] main interface debug: no interface module matching "globalhotkeys,none" could be loaded [0x712e40] main interface debug: TIMER module_need() : 1095.269 ms - Total 1095.269 ms / 1 intvls (Avg 1095.269 ms) [0x712e40] main interface error: no suitable interface module [0x6f28f0] main libvlc error: interface "globalhotkeys,none" initialization failed [0x712e40] main interface debug: looking for interface module: 1 candidate [0x712e40] dummy interface: using the dummy interface module... [0x712e40] main interface debug: using interface module "dummy" [0x712e40] main interface debug: TIMER module_need() : 2.403 ms - Total 2.403 ms / 1 intvls (Avg 2.403 ms) [0x77a9a0] main playlist debug: processing request item: null, node: Playlist, skip: 0 [0x77a9a0] main playlist debug: starting playback of the new playlist item [0x77a9a0] main playlist debug: resyncing on http://streaming.radio.funradio.fr/fun-1-44-128 [0x77a9a0] main playlist debug: http://streaming.radio.funradio.fr/fun-1-44-128 is at 0 [0x77a9a0] main playlist debug: creating new input thread [0x8735f8] main input debug: Creating an input for 'http://streaming.radio.funradio.fr/fun-1-44-128' [0x8735f8] main input debug: using timeshift granularity of 50 MiB, in path '/tmp' [0x8735f8] main input debug: `http://streaming.radio.funradio.fr/fun-1-44-128' gives access `http' demux `' path `streaming.radio.funradio.fr/fun-1-44-128' [0x8735f8] main input debug: creating demux: access='http' demux='' location='streaming.radio.funradio.fr/fun-1-44-128' file='(null)' [0x862648] main demux debug: looking for access_demux module: 0 candidates [0x862648] main demux debug: no access_demux module matched "http" [0x862648] main demux debug: TIMER module_need() : 1.060 ms - Total 1.060 ms / 1 intvls (Avg 1.060 ms) [0x8735f8] main input debug: creating access 'http' location='streaming.radio.funradio.fr/fun-1-44-128', path='(null)' [0x8627c0] main access debug: looking for access module: 2 candidates [0x8627c0] access_http access debug: asking libproxy about url 'http://streaming.radio.funradio.fr/fun-1-44-128' [0x8627c0] access_http access debug: libproxy suggest to use 'direct://' [0x8627c0] access_http access debug: http: server='streaming.radio.funradio.fr' port=80 file='/fun-1-44-128' [0x8627c0] main access debug: net: connecting to streaming.radio.funradio.fr port 80 [0x8627c0] main access debug: connection succeeded (socket = 6) [0x8627c0] access_http access debug: protocol 'HTTP' answer code 200 [0x8627c0] access_http access debug: Content-Type: audio/mpeg [0x8627c0] access_http access debug: Meta-Info: icy-br: 128 [0x8627c0] access_http access debug: Meta-Info: icy-description: FUN [MP3 128] [0x8627c0] access_http access debug: Icy-Name: FUN [MP3 128] [0x8627c0] access_http access debug: Meta-Info: icy-pub: 0 [0x8627c0] access_http access debug: Meta-Info: icy-url: http://www.funradio.fr [0x8627c0] access_http access debug: Server: Icecast 2.3.2-kh31.11 [0x8627c0] access_http access debug: Pragma: no-cache [0x8627c0] access_http access debug: Icy-MetaInt: 16000 [0x8627c0] access_http access warning: ICY metaint=16000 [0x8627c0] access_http access: Raw-audio server found, mp3 demuxer selected [0x8627c0] access_http access debug: auto re-connect enabled [0x8627c0] main access debug: using access module "access_http" [0x8627c0] main access debug: TIMER module_need() : 1975.021 ms - Total 1975.021 ms / 1 intvls (Avg 1975.021 ms) [0x789cc0] main stream debug: Using stream method for AStream* [0x789cc0] main stream debug: starting pre-buffering [0x789cc0] main stream debug: received first data after 94 ms [0x789cc0] main stream debug: pre-buffering done 1024 bytes in 0s - 10 KiB/s [0x789310] main stream debug: looking for stream_filter module: 7 candidates [0x789310] main stream debug: no stream_filter module matching "any" could be loaded [0x789310] main stream debug: TIMER module_need() : 1.230 ms - Total 1.230 ms / 1 intvls (Avg 1.230 ms) [0x789310] main stream debug: looking for stream_filter module: 1 candidate [0x789310] main stream debug: using stream_filter module "stream_filter_record" [0x789310] main stream debug: TIMER module_need() : 1.562 ms - Total 1.562 ms / 1 intvls (Avg 1.562 ms) [0x8735f8] main input debug: creating demux: access='http' demux='mp3' location='streaming.radio.funradio.fr/fun-1-44-128' file='(null)' [0x7864f8] main demux debug: looking for demux module: 1 candidate [0x7864f8] es demux debug: detected format mpga [0x77b320] main demux packetizer debug: looking for packetizer module: 21 candidates [0x77b320] main demux packetizer debug: using packetizer module "mpeg_audio" [0x77b320] main demux packetizer debug: TIMER module_need() : 30.250 ms - Total 30.250 ms / 1 intvls (Avg 30.250 ms) [0x77b320] mpeg_audio demux packetizer debug: MPGA channels:2 samplerate:44100 bitrate:128 [0x8735f8] main input debug: selecting program id=0 [0x7864f8] main demux debug: using demux module "es" [0x7864f8] main demux debug: TIMER module_need() : 36.456 ms - Total 36.456 ms / 1 intvls (Avg 36.456 ms) [0x7843d0] main decoder debug: looking for decoder module: 30 candidates [0x7843d0] main decoder debug: using decoder module "mpeg_audio" [0x7843d0] main decoder debug: TIMER module_need() : 23.871 ms - Total 23.871 ms / 1 intvls (Avg 23.871 ms) [0x77cf60] main demux meta debug: looking for meta reader module: 2 candidates [0x77cf60] lua demux meta debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/reader [0x77cf60] lua demux meta debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader [0x77cf60] lua demux meta debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac [0x77cf60] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader [0x77cf60] main demux meta debug: no meta reader module matching "any" could be loaded [0x77cf60] main demux meta debug: TIMER module_need() : 6.334 ms - Total 6.334 ms / 1 intvls (Avg 6.334 ms) [0x8735f8] main input debug: `http://streaming.radio.funradio.fr/fun-1-44-128' successfully opened [0x8735f8] main input debug: Buffering 0% [0x8735f8] main input debug: Buffering 2% [0x7843d0] mpeg_audio decoder debug: MPGA channels:2 samplerate:44100 bitrate:128 [0x77a9a0] main playlist debug: creating audio output [0x8735f8] main input debug: Buffering 5% [0x8735f8] main input debug: Buffering 7% [0x8735f8] main input debug: Buffering 10% [0x8735f8] main input debug: Buffering 13% [0x8735f8] main input debug: Buffering 15% [0x8735f8] main input debug: Buffering 18% [0x8735f8] main input debug: Buffering 20% [0x8735f8] main input debug: Buffering 23% [0x8735f8] main input debug: Buffering 26% [0x8735f8] main input debug: Buffering 28% [0x8735f8] main input debug: Buffering 31% [0x8735f8] main input debug: Buffering 33% [0x8735f8] main input debug: Buffering 36% [0x8735f8] main input debug: Buffering 39% [0x8735f8] main input debug: Buffering 41% [0x8735f8] main input debug: Buffering 44% [0x8735f8] main input debug: Buffering 47% [0x8679a0] main audio output debug: looking for audio output module: 3 candidates [0x8679a0] pulse audio output debug: using stereo channel map [0x8679a0] pulse audio output debug: using library version 2.0.0 [0x8679a0] pulse audio output debug: (compiled with version 2.0.0, protocol 26) [0x8735f8] main input debug: Buffering 49% [0x8735f8] main input debug: Buffering 52% [0x8735f8] main input debug: Buffering 54% [0x8735f8] main input debug: Buffering 57% [0x8735f8] main input debug: Buffering 60% [0x8735f8] main input debug: Buffering 62% [0x8735f8] main input debug: Buffering 65% [0x8735f8] main input debug: Buffering 67% [0x8735f8] main input debug: Buffering 70% [0x8735f8] main input debug: Buffering 73% [0x8735f8] main input debug: Buffering 75% [0x8735f8] main input debug: Buffering 78% [0x8735f8] main input debug: Buffering 80% [0x8735f8] main input debug: Buffering 83% [0x8735f8] main input debug: Buffering 86% [0x8735f8] main input debug: Buffering 88% [0x8735f8] main input debug: Buffering 91% [0x8627c0] access_http access debug: New Title= [0x8735f8] main input debug: Buffering 94% [0x8735f8] main input debug: Buffering 96% [0x8735f8] main input debug: Buffering 99% [0x8735f8] main input debug: Stream buffering done (1018 ms in 46 ms) xcb_connection_has_error() returned true [0x8679a0] pulse audio output error: PulseAudio server connection failure: Connection refused [0x8679a0] alsa audio output debug: keeping 2 channels [0x8679a0] alsa audio output debug: using ALSA device: default [0x8679a0] alsa audio output debug: Plug PCM: Hardware PCM card 0 'bcm2835 ALSA' device 0 subdevice 0 [0x8679a0] alsa audio output debug: device name : bcm2835 ALSA [0x8679a0] alsa audio output debug: device ID : bcm2835 ALSA [0x8679a0] alsa audio output debug: subdevice name: subdevice #0 [0x8679a0] alsa audio output debug: initial hardware setup: ACCESS: MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX RW_INTERLEAVED RW_NONINTERLEAVED FORMAT: S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE FLOAT64_LE FLOAT64_BE MU_LAW A_LAW IMA_ADPCM S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE U18_3BE SUBFORMAT: STD SAMPLE_BITS: [4 64] FRAME_BITS: [4 640000] CHANNELS: [1 10000] RATE: [8000 48000] PERIOD_TIME: (5333 8192000] PERIOD_SIZE: [256 65536] PERIOD_BYTES: [128 4294967295] PERIODS: (0 256] BUFFER_TIME: (5333 8192000] BUFFER_SIZE: [256 65536] BUFFER_BYTES: [128 4294967295] TICK_TIME: ALL [0x8679a0] alsa audio output debug: final HW setup: ACCESS: RW_INTERLEAVED FORMAT: FLOAT_LE SUBFORMAT: STD SAMPLE_BITS: 32 FRAME_BITS: 64 CHANNELS: 2 RATE: 44100 PERIOD_TIME: 40000 PERIOD_SIZE: 1764 PERIOD_BYTES: 14112 PERIODS: (9 10) BUFFER_TIME: (371519 371520) BUFFER_SIZE: 16384 BUFFER_BYTES: 131072 TICK_TIME: 0 [0x8679a0] alsa audio output debug: initial software parameters: tstamp_mode: NONE period_step: 1 avail_min: 1764 start_threshold: 1 stop_threshold: 16384 silence_threshold: 0 silence_size: 0 boundary: 1073741824 [0x8679a0] alsa audio output debug: final software parameters: tstamp_mode: NONE period_step: 1 avail_min: 1764 start_threshold: 1 stop_threshold: 16384 silence_threshold: 0 silence_size: 0 boundary: 1073741824 [0x8679a0] alsa audio output warning: device cannot be paused [0x8679a0] alsa audio output debug: Available ALSA PCM devices: [0x8679a0] alsa audio output debug: Discard all samples (playback) or generate zero samples (capture) (null) [0x8679a0] alsa audio output debug: bcm2835 ALSA, bcm2835 ALSA Default Audio Device (default:CARD=ALSA) [0x8679a0] alsa audio output debug: bcm2835 ALSA, bcm2835 ALSA Default Audio Device (sysdefault:CARD=ALSA) [color=#40FF00][0x8679a0] main audio output debug: using audio output module "alsa"[/color] [0x8679a0] main audio output debug: TIMER module_need() : 1179.847 ms - Total 1179.847 ms / 1 intvls (Avg 1179.847 ms) [0x8679a0] main audio output debug: output 'f32l' 44100 Hz Stereo frame=1 samples/8 bytes [0x8679a0] main audio output debug: mixer 'f32l' 44100 Hz Stereo frame=1 samples/8 bytes [0x8679a0] main audio output debug: filter(s) 'f32l'->'f32l' 44100 Hz->44100 Hz Stereo->Stereo [0x8679a0] main audio output debug: conversion pipeline completed [0x72d5a8] main mixer debug: looking for audio mixer module: 2 candidates [0x72d5a8] main mixer debug: using audio mixer module "float32_mixer" [0x72d5a8] main mixer debug: TIMER module_need() : 2.574 ms - Total 2.574 ms / 1 intvls (Avg 2.574 ms) [0x8679a0] main audio output debug: input 'mpga' 44100 Hz Stereo frame=1152 samples/1053 bytes [0x7821c8] main audio filter debug: looking for audio filter module: 1 candidate [0x7821c8] scaletempo audio filter debug: format: 44100 rate, 2 nch, 4 bps, fl32 [0x7821c8] scaletempo audio filter debug: params: 30 stride, 0.200 overlap, 14 search [0x7821c8] scaletempo audio filter debug: 1.000 scale, 1323.000 stride_in, 1323 stride_out, 1059 standing, 264 overlap, 617 search, 2204 queue, fl32 mode [0x7821c8] main audio filter debug: using audio filter module "scaletempo" [0x7821c8] main audio filter debug: TIMER module_need() : 3.403 ms - Total 3.403 ms / 1 intvls (Avg 3.403 ms) [0x8679a0] main audio output debug: filter(s) 'mpga'->'f32l' 44100 Hz->44100 Hz Stereo->Stereo [0x72baa8] main audio filter debug: looking for audio filter module: 14 candidates [0x72baa8] mpgatofixed32 audio filter debug: mpga->f32l, bits per sample: 32 [0x72baa8] main audio filter debug: using audio filter module "mpgatofixed32" [0x72baa8] main audio filter debug: TIMER module_need() : 9.446 ms - Total 9.446 ms / 1 intvls (Avg 9.446 ms) [0x8679a0] main audio output debug: conversion pipeline completed [0x8679a0] main audio output debug: filter(s) 'f32l'->'f32l' 44100 Hz->44100 Hz Stereo->Stereo [0x8679a0] main audio output debug: conversion pipeline completed [0x8679a0] main audio output debug: filter(s) 'f32l'->'f32l' 48510 Hz->44100 Hz Stereo->Stereo [0x72c500] main audio filter debug: looking for audio filter module: 14 candidates [0x72c500] main audio filter debug: using audio filter module "samplerate" [0x72c500] main audio filter debug: TIMER module_need() : 4.619 ms - Total 4.619 ms / 1 intvls (Avg 4.619 ms) [0x8679a0] main audio output debug: conversion pipeline completed [0x7843d0] main decoder debug: End of audio preroll [0x8735f8] main input debug: Decoder buffering done in 1162 ms [0x8679a0] main audio output warning: PTS is out of range (-8541), dropping buffer [0x8679a0] main audio output warning: PTS is out of range (-34322), dropping buffer [0x72baa8] mpgatofixed32 audio filter debug: libmad error: bad main_data_begin pointer [0x8679a0] alsa audio output debug: prepending 2451 zeroes [0x72baa8] mpgatofixed32 audio filter debug: libmad error: bad main_data_begin pointer [0x6f28f0] main libvlc debug: deactivating the playlist [0x77a9a0] main playlist debug: deactivating the playlist [0x77a9a0] main playlist debug: incoming request - stopping current input [0x8627c0] main access debug: waitpipe: object killed [0x77a9a0] main playlist debug: dying input [0x8735f8] main input debug: control: stopping input [0x77a9a0] main playlist debug: dying input [0x7843d0] main decoder debug: removing module "mpeg_audio" [0x7843d0] main decoder debug: killing decoder fourcc `mpga', 28 PES in FIFO [0x72baa8] main audio filter debug: removing module "mpgatofixed32" [0x7821c8] main audio filter debug: removing module "scaletempo" [0x72c500] main audio filter debug: removing module "samplerate" [0x8679a0] main audio output debug: removing module "alsa" [0x72d5a8] main mixer debug: removing module "float32_mixer" [0x77a9a0] main playlist debug: releasing audio output [0x7864f8] main demux debug: removing module "es" [0x77b320] main demux packetizer debug: removing module "mpeg_audio" [0x789310] main stream debug: removing module "stream_filter_record" [0x8627c0] main access debug: removing module "access_http" [0x8735f8] main input debug: Program doesn't contain anymore ES [0x77a9a0] main playlist debug: dead input [0x8735f8] main input debug: TIMER input launching for 'http://streaming.radio.funradio.fr/fun-1-44-128' : 2149.155 ms - Total 2149.155 ms / 1 intvls (Avg 2149.155 ms) [0x72c2f8] main playlist export debug: saving Media Library to file /home/pi/.local/share/vlc/ml.xspf [0x72c2f8] main playlist export debug: looking for playlist export module: 1 candidate [0x72c2f8] main playlist export debug: using playlist export module "export" [0x72c2f8] main playlist export debug: TIMER module_need() : 3.065 ms - Total 3.065 ms / 1 intvls (Avg 3.065 ms) [0x72c2f8] main playlist export debug: removing module "export" [0x77a9a0] main playlist debug: playlist correctly deactivated [0x6f28f0] main libvlc debug: removing all services discovery tasks [0x6f28f0] main libvlc debug: removing all interfaces [0x6f28f0] main libvlc debug: exiting [0x712e40] main interface debug: removing module "dummy" [0x705b20] main interface debug: removing module "hotkeys" [0x77a9a0] main playlist debug: destroying [0x6f28f0] main libvlc debug: TIMER ML Load : Total 83.673 ms / 1 intvls (Avg 83.673 ms) [0x6f28f0] main libvlc debug: TIMER Items array build : Total 0.537 ms / 1 intvls (Avg 0.537 ms) [0x6f28f0] main libvlc debug: TIMER ML Dump : Total 5.102 ms / 1 intvls (Avg 5.102 ms) [0x6f28f0] main libvlc debug: removing stats [0x6f28f0] main libvlc debug: removing module "memcpy"
Last edited by computer007 on 10 Apr 2014 23:33, edited 1 time in total.

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

Re: Wrong VLC volume at launch after calling alsa-lib

Postby Rémi Denis-Courmont » 10 Apr 2014 23:33

It is not possible for VLC to "ignore" or bypass the ALSA mixer volumes. And VLC does not touch the ALSA mixer volumes in any way (except possibly through PulseAudio but not in your case).
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

computer007
New Cone
New Cone
Posts: 3
Joined: 10 Apr 2014 22:55

Re: Wrong VLC volume at launch after calling alsa-lib

Postby computer007 » 10 Apr 2014 23:37

Thanks for your answer.

I'm OK with the fact that VLC does not modify the volume level :). As I mentionned, when the playback starts with a volume higher than expected I can see that the ALSA volume (via alsamixer) is properly set and not modified (by VLC) after my call to alsa-lib.

So I really don't understand why the playback starts at an incorrect volume and then is OK when I perform the same call to ALSA lib. If my call was incorrect it would probably not work at any time.

Could it be a local VLC "volume gain" applied at application level and not related to the ALSA volume.
I didn't see something special in the log, and ALSA is mentionned to be used for volume management.

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

Re: Wrong VLC volume at launch after calling alsa-lib

Postby Rémi Denis-Courmont » 10 Apr 2014 23:41

I can only assume this is a bug in your ALSA drivers or plugins.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

computer007
New Cone
New Cone
Posts: 3
Joined: 10 Apr 2014 22:55

Re: Wrong VLC volume at launch after calling alsa-lib

Postby computer007 » 10 Apr 2014 23:47

It's a bad news!

But I don't understand why when setting the volume once VLC has started (even at the very very beginning / first lines of debug) it works, and just before it does not.
Is there a way to see the volume level used by VLC at startup?

Thanks for your replies and help :)


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 48 guests