-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set volume for only a specific player? #90
Comments
@jonafeucht It really is a strange thing. I also had this problem, according to the LibVLC developers they say they should apply how a VLC player works, a separate volume per player. But I have noticed that the volume is applied to all the players, the solution assigns an output device without being the default and you will be able to manage the volume independently. It is not the correct solution but it works for me. The ideal is to watch without in C ++ allows you to control the volume independently per player. Contact the LibVLC developers for this change. |
Currently volume control isn't very good. I have to look libVLC APIs before claiming anything. Marking as "good first issue" aswell. |
I have not been able to check it 100%. Command line: read more here: I will try it if it works |
@DomingoMG could you get it to work? |
@KyleKun I currently don't have a solution per player. It would be necessary to see if @alexmercerind could look for some type of complement that allows to differentiate the volume of the player. In case of finding a better solution I will post it here. |
found solution? |
@trapeye, @alexmercerind, @KyleKun, @jonafeucht SOLUTION FOUND: I must indicate that I have spent days looking for millions of solutions, it has worked for me, I would appreciate a thumbs up. COMMAND LINE: vlc.exe "D:\tracks\Melendi - La Chica Perfecta.mp3" --aout=directsound --directx-volume=0.35 DART: Player _player1 = Player(id: id, commandlineArguments: ['--aout=directsound', '--directx-volume=0.35']);
_player1.open(....Media.....);
_player1.setVolume(1.0);
Player _player2 = Player(id: id, commandlineArguments: ['--aout=directsound', '--directx-volume=0.35']);
_player2.open(....Media.....);
_player2.setVolume(0.50); REMOVE INITIAL VOLUME IN C++: DART_VLC/player.h |
Hi @alexmercerind, you could let the user decide if it's directx-Sound, the setdevice is without {0.0.0.00000000}. and if it is mmdevice it is with {0.0.0.00000000}... By default when instantiating the player in libvlc without the command line it is type --aout=mmdevice. mmdevice uses {0.0.0.00000000}.{D267875D-5AEE-4346-AB97-8DDF8D51E28C} In the setDevice command ( OPTIONAL ) setDevice(Device device, { bool isDirectxSound = false }){
if( isDirectxSound ) {
device.id = {D267875D-5AEE-4346-AB97-8DDF8D51E28C}
} else {
device.id = {0.0.0.00000000}.{D267875D-5AEE-4346-AB97-8DDF8D51E28C}
}
} It is 100% proven that it works like this. The documentation indicates that depending on the type it corresponds in one way or another. read more here: |
Say I have two players:
Player player1 = Player(id: 1);
Player player2 = Player(id: 2);
If I change the volume of player1 it will also change the volume for player2, which shouldn't happen.
The text was updated successfully, but these errors were encountered: