def _gatherDeviceInfo(cls):
        for devno in range(pypm.CountDevices()):
            info = pypm.GetDeviceInfo(devno)

            insouts = {'output': None, 'input': None}
            m = cls.deviceMap.setdefault(info[1], insouts)
            if info[3]:
                cls.outputs.append(devno)
                m['output'] = devno
            if info[2]:
                cls.inputs.append(devno)
                m['input'] = devno

        cls.inputNames = dict(
                (v['input'], k) for (k, v) in cls.deviceMap.items()
                if v['input'] is not None
        )
        cls.outputNames = dict(
                (v['output'], k) for (k, v) in cls.deviceMap.items()
                if v['output'] is not None
        )