adjusting volume when using media_list_player_new()

This forum is about all development around libVLC.
rolfofsaxony
New Cone
New Cone
Posts: 4
Joined: 26 Mar 2016 12:21

adjusting volume when using media_list_player_new()

Postby rolfofsaxony » 18 Jul 2017 17:42

When using vlc.py and media_list_player_new() does anybody know if you can adjust the volume?
I have managed to set the initial volume with a dirty hack of creating a sub_player that uses media_player_new()
and setting audio_set_volume(volume) but once media_list_player_new() is activated, no amount of monkeying around with the sub_player will adjust the volume.
Some stripped down python code:

Code: Select all

import vlc import time playlist=['/home/rolf/vp1.mp3','/home/rolf/vp.mp3'] inst = vlc.Instance() sub_player = inst.media_player_new() player = inst.media_list_player_new() mediaList = inst.media_list_new(playlist) player.set_media_list(mediaList) volume = 60 sub_player.audio_set_volume(volume) sub_player.play() playing = set([1,2,3,4]) player.play() while player.get_state() in playing: time.sleep(1)
media_list_player_new() has no audio_set_volume() option, is this an oversight or is the volume meant to be adjusted in some other way?

Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 17 guests