[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] play sound delay



Hi,

Add the following line:
pygame.mixer.pre_init(frequency=22050, size=-16, channels=8, buffer=256)

Immediately after these lines at the beginning of your file:
import pygame
from pygame.locals import *

And before:
pygame.init()

So:
import pygame
from pygame.locals import *
pygame.mixer.pre_init(frequency=22050, size=-16, channels=8, buffer=256)
pygame.init()
#Rest of your code

Ian