Reputation: 3722
I execute following code
import pygame
import pygame.mixer
pygame.init()
pygame.mixer.pre_init(44100, -16, 1, 2048)
pygame.mixer.init()
print pygame.mixer.get_init()
and it prints
(22050, -16, 2)
So I'm not sure if it works. I expect it would show (44100,-16,1)
. Is it correct or am I missing something?
I'm using python-pygame 1.9.1 and python 2.7.9 on my raspi with raspbian jessie.
Upvotes: 2
Views: 73
Reputation: 3722
Ok, I've found the answer. pygame.init()
should be called after pygame.mixer.pre_init()
So
import pygame
import pygame.mixer
pygame.mixer.pre_init(44100, -16, 1, 2048)
pygame.init()
print pygame.mixer.get_init()
works as expected.
Upvotes: 2