What is the difference between pygame.mixer init and pygame.mixer pre init? I saw a tutorial and he used pre-init, but the explanation wasn't clear. Should I just use mixer init, or do both?
The problem is that pygame.init()
, which initialize all imported Pygame modules, calls pygame.mixer.init()
with its default arguments, because
some platforms require the
pygame.mixer
to be initialized after the display modules have initialized.
as the documentation states.
To solve this problem and set proper default values for frequency
, channels
and buffersize
you could call pygame.mixer.pre_init()
to preset the default mixer init arguments before you call the pygame.init()
toplevel function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With