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

Re: [pygame] Overall volume control for sounds



Ivan DelSol wrote:
> I'm trying to write a system that has controls for overall sound
> effect volume. There does not seem to be a way to control all the
> sound channels... There doesn't seem to be a way to get pygame to pass
> channels by ID so that I could alter their volumes individually, let
> alone control the sound channels' volumes as a whole.
>
> Volume control seems like a pretty standard need in a game. Anyone
> else figured this out?
>
>   
Can't you just do it like this?
for i in range(pygame.get_num_channels()):
    c = pygame.Channel(i)
    c.set_volume(your_volume)