def voldown(): global vol global playing vol -= 0.02 mp3.set_volume(vol) #cvol = mp3.get_volume() newlogline("Volume down") print(mp3.get_volume()) sense.show_letter("-", text_colour=g, back_colour=b) sleep(0.3) if playing == False: displayH("pause") elif playing == True: displayH("play") else: displayH("smile")
def draw(self, surf): r = self.get_margin_rect() r.width = int(round(music.get_volume() * r.width)) surf.fill(self.fg_color, r)
def get_volume(self): music.get_volume()
def on_off(): if (music.get_volume() > 0): music.set_volume(0) elif (music.get_volume() == 0): music.set_volume(0.5)
def get_music_volume(self): return music.get_volume()
def volume(self) -> float: return pgmusic.get_volume() * 128