pythonlinuxpygamemidialsa

Linux Python Pygame Cannot access /etc/alsa/alsa.conf


I'm trying to run a basic Pygame midi script consisting of the following:

import pygame, pygame.midi    

pygame.midi.init()    
print "Midi Devices " + str(pygame.midi.get_count())

And i get the following output.

ALSA lib conf.c:3009:(snd_config_update_r) Cannot access file /etc/alsa/alsa.conf
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ default
Midi Devices 0

I found out that the alsa.conf file is in /usr/share/alsa/ rather than /etc/alsa/, but I don't know how to get it to look for the file on the proper path.

EDIT: I forgot to mention this, but /etc/alsa/ does not exist


Solution

  • Make a link with ln

    $ man ln
    
    SYNOPSIS
       ln [OPTION]... [-T] TARGET LINK_NAME   (1st form)
       ln [OPTION]... TARGET                  (2nd form)
       ln [OPTION]... TARGET... DIRECTORY     (3rd form)
       ln [OPTION]... -t DIRECTORY TARGET...  (4th form)
    

    In the 1st form, create a link to TARGET with the name LINK_NAME. In the 2nd form, create a link to TARGET in the current directory. In the 3rd and 4th forms, create links to each TARGET in DIRECTORY. Create hard links by default, symbolic links with --symbolic. By default, each destination (name of new link) should not already exist. When creating hard links, each TARGET must exist. Symbolic links can hold arbitrary text; if later resolved, a relative link is interpreted in relation to its parent directory.