Example #1
0
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")
Example #2
0
 def draw(self, surf):
     r = self.get_margin_rect()
     r.width = int(round(music.get_volume() * r.width))
     surf.fill(self.fg_color, r)
Example #3
0
 def get_volume(self):
     music.get_volume()
Example #4
0
 def draw(self, surf):
     r = self.get_margin_rect()
     r.width = int(round(music.get_volume() * r.width))
     surf.fill(self.fg_color, r)
Example #5
0
def on_off():
    if (music.get_volume() > 0):
        music.set_volume(0)
    elif (music.get_volume() == 0):
        music.set_volume(0.5)
Example #6
0
 def get_music_volume(self):
     return music.get_volume()
Example #7
0
 def volume(self) -> float:
     return pgmusic.get_volume() * 128