Pages

duminică, 12 martie 2017

PyGame : How play ogg file.

Let's see how to play file.ogg file with pygame python module.
import pygame
import time
pygame.init()
pygame.mixer.music.load('file.ogg')
pygame.mixer.music.play()
time.sleep(1.5)