Esempio n. 1
0
    def mul(self, factor):
        """
        Convert the channel that has all frames in the original channel are
        multiplied by the floating-point value factor.
        Samples are truncated in case of overflow.

        @param factor (float) the factor to multiply the frames

        """
        if factor == 1.:
            return
        newchannel = Channel()
        newchannel.sampwidth = self.sampwidth
        newchannel.framerate = self.framerate
        a = AudioFrames( self.channel.get_frames(self.channel.get_nframes()), self.channel.get_sampwidth(), 1)
        newchannel.set_frames( a.mul(factor) )

        self.channel = newchannel