Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)
Get MPEG Duration.
:param sample_count: Count of samples.
:type sample_count: int

:param sample_rate: Sample rate in Hz.
:type sample_rate: int

:return: Duration of MPEG, accuracy in seconds.
:rtype: datetime.timedelta

        def get_duration_from_sample_count(sample_count, sample_rate):
    """Get MPEG Duration.
    :param sample_count: Count of samples.
    :type sample_count: int
    
    :param sample_rate: Sample rate in Hz.
    :type sample_rate: int
    
    :return: Duration of MPEG, accuracy in seconds.
    :rtype: datetime.timedelta
    
    """
    return timedelta(seconds=int(round(sample_count / sample_rate)))
        


src/m/p/mpeg1audio-0.5.2/src/mpeg1audio/__init__.py   mpeg1audio(Download)
            if sample_count is not None:
                self.duration = \
                    headers.get_duration_from_sample_count(sample_count,
                                                    self.sample_rate)
#            mpeg_size = self._get_size()
            if sample_count is not None:
                self.duration = \
                    headers.get_duration_from_sample_count(sample_count,
                                                    self.sample_rate)
 

src/m/p/mpeg1audio-HEAD/src/mpeg1audio/__init__.py   mpeg1audio(Download)
            if sample_count is not None:
                self.duration = \
                    headers.get_duration_from_sample_count(sample_count,
                                                    self.sample_rate)
#            mpeg_size = self._get_size()
            if sample_count is not None:
                self.duration = \
                    headers.get_duration_from_sample_count(sample_count,
                                                    self.sample_rate)