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

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Get bitrate from given header data.

:param mpeg_version: Version of the MPEG, as returned by
    :func:`get_mpeg_version`
:type mpeg_version: string

:param layer: Layer of the MPEG as returned by :func:`get_layer`.
:type layer: string

:param bitrate_bits: Four bitrate related bits in MPEG header.(more...)

        def get_bitrate(mpeg_version, layer, bitrate_bits):
    """ Get bitrate from given header data.
    
    :param mpeg_version: Version of the MPEG, as returned by
        :func:`get_mpeg_version`
    :type mpeg_version: string
    
    :param layer: Layer of the MPEG as returned by :func:`get_layer`.
    :type layer: string
    
    :param bitrate_bits: Four bitrate related bits in MPEG header.
    :type bitrate_bits: int
    
    :return: Bitrate in *kilobits* per second.
    :rtype: int
    
    :raise mpeg1audio.MPEGAudioHeaderException: Raised when bitrate cannot be
        determined.
    
    """

    # TODO: LOW: Free bitrate
    if bitrate_bits == 0:
        raise MPEGAudioHeaderException(
                        'Free bitrate is not implemented, sorry.')

    try:
        return BITRATE[mpeg_version][layer][bitrate_bits]
    except (KeyError, IndexError):
        raise MPEGAudioHeaderException('Bitrate cannot be determined.')
        


src/m/p/mpeg1audio-0.5.2/src/mpeg1audio/__init__.py   mpeg1audio(Download)
        self.version = headers.get_mpeg_version(mpeg_version_bits)
        self.layer = headers.get_layer(layer_bits)
        self.bitrate = headers.get_bitrate(self.version, self.layer,
                                           bitrate_bits)
        self.sample_rate = headers.get_sample_rate(self.version,

src/m/p/mpeg1audio-HEAD/src/mpeg1audio/__init__.py   mpeg1audio(Download)
        self.version = headers.get_mpeg_version(mpeg_version_bits)
        self.layer = headers.get_layer(layer_bits)
        self.bitrate = headers.get_bitrate(self.version, self.layer,
                                           bitrate_bits)
        self.sample_rate = headers.get_sample_rate(self.version,