我试图在播放音频文件时设置音量,但它似乎根本不起作用。请问我做错了什么?
# create a vlc playable object from source
self.playable = vlc.libvlc_media_new_path(self.instance, sourceURL)
# create a new vlc player
self.player = vlc.libvlc_media_player_new_from_media(self.playable)
# play
vlc.libvlc_media_player_play(self.player)
while not self.stop:
sleep(10) # sleep for a while to allow playback
self.player.audio_set_volume(50) # suppose to reduce volume. Doesn't work
sleep(10) # sleep for a while to allow playback
self.stop = True