Ejemplo n.º 1
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)))
Ejemplo n.º 2
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)))