예제 #1
0
 def volumeChange(self, volume: int) -> None:
     logVolume = QAudio.convertVolume(volume / 100,
                                      QAudio.LogarithmicVolumeScale,
                                      QAudio.LinearVolumeScale) * 100
     self.player.setVolume(logVolume)
     self.volume = volume
     self.mediaControlArea.updateVolumeBar(volume)
예제 #2
0
 def set_volume(self, volume):
     log_volume = QAudio.convertVolume(volume / 100,
                                       QAudio.LinearVolumeScale,
                                       QAudio.LogarithmicVolumeScale)
예제 #3
0
    def volume(self):
        linear_volume = QAudio.convertVolume(self.volume_slider.value() / 100,
                                             QAudio.LogarithmicVolumeScale,
                                             QAudio.LinearVolumeScale)

        return qRound(linear_volume * 100)