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?
            Asked
            
        
        
            Active
            
        
            Viewed 1,398 times
        
    1 Answers
3
            
            
        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.mixerto 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.
        elegent
        
- 3,857
 - 3
 - 23
 - 36