Exemple #1
0
    def rms(self):
        """
        Return the root mean square of the channel.

        @return (int) the root mean square of the channel

        """
        a = AudioFrames(self.frames, self.sampwidth, 1)
        return a.rms()
Exemple #2
0
    def get_cross(self):
        """
        Return the number of zero crossings.

        @return (int) number of zero crossing

        """
        a = AudioFrames(self.frames, self.sampwidth, 1)
        return a.cross()
Exemple #3
0
    def clipping_rate(self, factor):
        """
        Return the clipping rate of the frames.

        @param factor (float) An interval to be more precise on clipping rate.
        It will consider that all frames outside the interval are clipped.
        Factor has to be between 0 and 1.
        @return (float) the clipping rate

        """
        a = AudioFrames(self.frames, self.sampwidth, 1)
        return a.clipping_rate(factor)