[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Panning with Channel.set_volume
- To: pygame-users@seul.org
- Subject: [pygame] Panning with Channel.set_volume
- From: Matthias =?utf-8?q?K=C3=B6ster?= <katastrofen.matt@web.de>
- Date: Tue, 18 May 2004 08:34:52 +0200
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Tue, 18 May 2004 02:35:52 -0400
- Organization: maschinenstuermer.com
- Reply-to: pygame-users@seul.org
- Sender: owner-pygame-users@seul.org
- User-agent: KMail/1.6
Hi,
I am currently developing a multiplayer game with pygame (my system is a
gentoo box with kernel 2.6.4, ALSA and sdl-mixer-1.2.5) and tried to use the
Channel.set_volume function to pan the sounds. But to me it is unclear what
the second parameter means: after reading the documentation of pygame and
consulting the book "Game Programming with Python" from Sean Riley i still
can't hear the difference between setting a panning value of 0.0 or 1.0. For
example i tried the following in the python shell:
import pygame
pygame.init()
pygame.mixer.init()
snd = pygame.mixer.Sound('sounds/partyhorn.wav')
chan = pygame.mixer.find_channel()
chan.set_volume(1.0, 0.0)
chan.play(snd)
chan.set_volume(1.0, 1.0)
chan.play(snd)
Here i would think that the first played sound would only play on the left
speaker and the second on the right speaker. But as said before, i can't
hear the difference! Maybe it's caused by non stereo sound samples? Perhaps i
have misunderstood the set_volume method?
Regards,
Matthias