Re: Audio wrapper for Python
@38
i've tried boath with your method and without, i get "unsupported codec" error. are there anyway of doing this by any other library, that would also be ok for me. can You guide me thru?
My code was this one btw.
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\Rap-Hip-Hop Old School Break Beats.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)
if event.key == pygame.K_ESCAPE:
mixer.music.stop()
mixer.music.unload()
pygame.quit()
sys.exit(0)
#update window
pygame.display.update()
play()
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector