Esempio n. 1
0
    def remove_offset(self):
        """
        Convert the channel by removing the offset in the channel.

        """
        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)
        avg = a.avg()
        newchannel.set_frames( a.bias( - avg ) )

        self.channel = newchannel