Re: i build a music player and got some questions

Hi,

Try something like this. Note that I didn't test this code so I probably broke it.

import os
import pygame
pygame.init()
pygame.mixer.init()
formats=[".mp3",".ogg",".flac"]
path = input("Where are your audio files located? ")
for i in os.walk(path):
  for i2 in formats:
    if i.endswith(i2):
      pygame.mixer.music.load(i)
      pygame.mixer.music.play(0)

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Turkce_Rap via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : masonian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Turkce_Rap via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Turkce_Rap via Audiogames-reflector

Reply via email to