def set_volume(self, left, right=None):
        """Set the volume of a playing channel.

        Set the volume (loudness) of a playing sound. When a channel starts to
        play its volume value is reset. This only affects the current sound.
        Each argument is between 0.0 and 1.0.

        If one argument is passed, it will be the volume of both speakers.
        If two arguments are passed and the mixer is in stereo mode, the
        first argument will be the volume of the left speaker and the second
        will be the volume of the right speaker. (If the second argument is
        None, the first argument will be the volume of both speakers.)

        If the channel is playing a Sound on which set_volume() has also
        been called, both calls are taken into account. For example::

            sound = pygame.mixer.Sound("s.wav")
            channel = s.play()      # Sound plays at full volume by default
            sound.set_volume(0.9)   # Now plays at 90% of full volume.
            sound.set_volume(0.6)   # Now plays at 60% (previous value replaced)
            channel.set_volume(0.5) # Now plays at 30% (0.6 * 0.5).

        :Parameters:
            `left` : float
                Volume of left (or mono) channel, in range [0.0, 1.0]
            `right` : float
                Volume of right channel, in range [0.0, 1.0]

        """
        _mixer_init_check()
        if Mix_Linked_Version().is_since((1, 2, 1)):
            if right is None:
                Mix_SetPanning(self._id, 255, 255)
            else:
                Mix_SetPanning(self._id, int(left * 255), int(right * 255))
                left = 1.0
        else:
            if right is not None:
                left = (left + right) / 2

        Mix_Volume(self._id, int(left * 128))
dataset/ETHPy150Open los-cocos/cocos/cocos/audio/pygame/mixer.py/Channel.set_volume/original