How does reserving channels work? Can I reserve specific channels or are they picked randomly? There is no clear documentation on how it works and I seem to do it wrong because mixer.findChannel()
still picks reserved channels.
Here's my code:
self.music1 = pygame.mixer.Channel(0)
self.music2 = pygame.mixer.Channel(1)
self.sound1 = pygame.mixer.Channel(2)
self.sound2 = pygame.mixer.Channel(3)
self.sound3 = pygame.mixer.Channel(4)
self.sound4 = pygame.mixer.Channel(5)
self.sound5 = pygame.mixer.Channel(6)
self.sound6 = pygame.mixer.Channel(7)
pygame.mixer.set_reserved(2)
I'd like to reserve music1 and music2.
The documentation states that the argument of mixer.set_reserved()
defines the number of channels that will be reserved.
If I can't pick which channels will be reserved, is there a way around it?
Thanks in advance