Page 1 of 1

libvlc_audio_set_volume_callback / Python

Posted: 30 Oct 2014 19:52
by dav1d
I am currently trying to get a callback whenever the Volume changes, after digging through the binding file and documentation I found `libvlc_audio_set_volume_callback`. Now the question is how does it work?

Excerpt from the code:

Code: Select all

@vlc.CallbackDecorators.AudioSetVolumeCb def test(volume, mute): print('TEST!!!') print(volume, mute) instance = vlc.Instance(self.options) player = self.instance.media_player_new() player.audio_set_volume_callback(test)
Later on a media file is loaded and playback started. All other events work fine, but I have a problem with this specific callback, it is never triggered. Anyone an idea why it doesn't work or a working example in any language but Java (because Java bindings seem to do strange things)?

Help greatly appreciated.
- David

Re: libvlc_audio_set_volume_callback / Python

Posted: 07 Dec 2014 22:16
by OlivierAubert
There has been no answer on this forum, but I would guess that the doc change that was done few minutes after this post is related. For the (forum) record, the documentation for

Code: Select all

libvlc_audio_set_volume_callback
states that "This only works in combination with libvlc_audio_set_callbacks().".