Esempio n. 1
0
 def GetMixerDevices(self):
     mixcaps = MIXERCAPS()
     result = []
     for i in range(mixerGetNumDevs()):
         if mixerGetDevCaps(i, byref(mixcaps), sizeof(MIXERCAPS)):
             continue
         result.append((i, mixcaps.szPname))
     return result
Esempio n. 2
0
 def GetMixerDevices(self):
     mixcaps = MIXERCAPS()
     result = []
     for i in range(mixerGetNumDevs()):
         if mixerGetDevCaps(i, byref(mixcaps), sizeof(MIXERCAPS)):
             continue
         result.append((i, mixcaps.szPname))
     return result
Esempio n. 3
0
def GetMixerDevices(useList=False):
    """ Returns a list of all mixer device names available on the system."""
    mixcaps = MIXERCAPS()
    result = []
    # get the number of Mixer devices in this computer
    result.append("Primary Sound Driver")
    for i in range(mixerGetNumDevs()):
        # get info about the device
        if mixerGetDevCaps(i, byref(mixcaps), sizeof(MIXERCAPS)):
            continue
        # store the name of the device
        result.append(mixcaps.szPname)
    return result if useList else dict((i - 1, result[i]) for i in range(len(result)))