Hedi Member Jul 4, 2023 #1 Hello, How can I set volume to a media player? mp1.SetVolume(1,1) I found a solution but I don't know how to convert it to B4A Click here to see the solution (StackOverflow) The code that works: C#: float volume1F = (float) volume1/100; Then, you could do this to set the volume: C#: mp1.setVolume(volume1F, volume1F); Thanks so much for your helps.
Hello, How can I set volume to a media player? mp1.SetVolume(1,1) I found a solution but I don't know how to convert it to B4A Click here to see the solution (StackOverflow) The code that works: C#: float volume1F = (float) volume1/100; Then, you could do this to set the volume: C#: mp1.setVolume(volume1F, volume1F); Thanks so much for your helps.
Erel B4X founder Staff member Licensed User Longtime User Jul 5, 2023 #2 I don't understand the question. You can set the volume with MediaPlayer.SetVolume. Upvote 0
Hedi Member Jul 5, 2023 #3 Erel said: I don't understand the question. You can set the volume with MediaPlayer.SetVolume. Click to expand... I am creating an app where I have three MediaPlayer objects in my activity. Let's call them mp1, mp2 and mp3. I am playing all of the 3 MediaPlayers at the same time, so the user should be able to set how loud each of the sounds should be. For example, mp1 should be low, mp2 should be loud, mp3 should be medium. Upvote 0
Erel said: I don't understand the question. You can set the volume with MediaPlayer.SetVolume. Click to expand... I am creating an app where I have three MediaPlayer objects in my activity. Let's call them mp1, mp2 and mp3. I am playing all of the 3 MediaPlayers at the same time, so the user should be able to set how loud each of the sounds should be. For example, mp1 should be low, mp2 should be loud, mp3 should be medium.