Re: Audio wrapper for Python
@47
i see no underscore inside the actual code though, here it is:
import pygame
from pygame import mixer
import glob
from mutagen.mp3 import MP3
import sys
def play():
pygame.init()
mixer.init()
pencere = pygame.display.set_mode([640,480])
song = ("D:\Müzik\Yildiz Tilbe-Ama Evlisin.mp3")
mixer.music.load(song)
#audio = MP3(song)
#length = audio.info.length
while True:
for event in pygame.event.get():
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_SPACE:
mixer.music.play()
if event.key == pygame.K_RIGHT:
if mixer.get_busy:
mixer.music.set_pos((mixer.music.get_pos()/1000.0)+60)
if event.key == pygame.K_ESCAPE:
mixer.music.stop()
pygame.mixer.music.unload
pygame.quit()
sys.exit(0)
#Pencereyi güncelle
pygame.display.update()
play()
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector