'Enumerate the defined audio output devices.
@return: list of dicts {name:, description:, devices:}'

def audio_output_enumerate_devices(self):

    r = []
    head = libvlc_audio_output_list_get(self)
    if head:
        i = head
        while i:
            i = i.contents
            d = [{'id': libvlc_audio_output_device_id(self, i.name, d), 'longname': libvlc_audio_output_device_longname(self, i.name, d)} for d in range(libvlc_audio_output_device_count(self, i.name))]
            r.append({'name': i.name, 'description': i.description, 'devices': d})
            i = i.next
        libvlc_audio_output_list_release(head)
    return r
