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 channel mode.

:param bits: Mode bits in MPEG header.
:type bits: int

:return: Returns one of the following: ``"stereo"``, ``"joint stereo"``, 
    ``"dual channel"``, ``"mono"``. 
:rtype: string

:raise mpeg1audio.MPEGAudioHeaderException: Raised if channel mode cannot be (more...)

        def get_channel_mode(bits):
    """Get channel mode.
    
    :param bits: Mode bits in MPEG header.
    :type bits: int
    
    :return: Returns one of the following: ``"stereo"``, ``"joint stereo"``, 
        ``"dual channel"``, ``"mono"``. 
    :rtype: string
    
    :raise mpeg1audio.MPEGAudioHeaderException: Raised if channel mode cannot be 
        determined.
    """


    try:
        return CHANNEL_MODES[bits]
    except (IndexError, TypeError):
        raise MPEGAudioHeaderException(
                            'Channel channel_mode cannot be determined.')
        


src/m/p/mpeg1audio-0.5.2/src/mpeg1audio/__init__.py   mpeg1audio(Download)
        self.sample_rate = headers.get_sample_rate(self.version,
                                                   samplerate_bits)
        self.channel_mode = headers.get_channel_mode(mode_bits)
        self.channel_mode_extension = \
            headers.get_channel_mode_ext(self.layer, mode_extension_bits)

src/m/p/mpeg1audio-HEAD/src/mpeg1audio/__init__.py   mpeg1audio(Download)
        self.sample_rate = headers.get_sample_rate(self.version,
                                                   samplerate_bits)
        self.channel_mode = headers.get_channel_mode(mode_bits)
        self.channel_mode_extension = \
            headers.get_channel_mode_ext(self.layer, mode_extension_bits)