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

Re: [pygame] Panning with Channel.set_volume



Hi Sami,

> > 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?
>
> Hmmm. Do you actually even hear two sounds? The channel.play method

I heard two sounds because i was issueing the commands from an interactive 
python shell and waited for the first sound to stop playing before playing 
the second sound.

> And the way I read the docs, you pass (1.0, 0.0) and (0.0, 1.0) to
> set_volume in order to get sound from only one channel.

Thanks, that works! The "Game programming with Python" book seems to be wrong, 
there the author said that the second parameter to Channel.set_volume was 
responsible for controlling the "stereo ratio". And after rereading the 
pygame doc looks like i have misunderstood the meaning of the second 
parameter. Perhaps the documentation would be clearer if the parameters would 
be called left and right volume? Even if specifying a single parameter would 
set the "overall" volume?

Regards,
Matthias Köster