Fantastic! I'm using a USB audio adapter and I looked into ALSA, thanks to your suggestion, and found that I was selecting the USB sound source in ~/.asoundrc instead of /etc/asound.conf (a stupid mistake). Just switching that solved the problem.
Thanks again, Arthur On Aug 30, 2013, at 10:38 AM, James Paige <b...@hamsterrepublic.com> wrote: > On Fri, Aug 30, 2013 at 7:16 AM, Arthur Sugden <arthur.sug...@gmail.com> > wrote: > Howdy, > > I'm using pygame.mixer on an embedded project (a Beaglebone Black which is > similar to a Raspberry Pi). My program works perfectly when run from the > command line, even from / (i.e. I've correctly put in the links to sound > files), but when I add the program to rc.local, no sound comes out when I > start up the board. Can someone help? Do I have to run it as sudo from some > user space startup file? If so, can you tell me which? > > Thanks much, > Arthur > > I am just taking a wild guess here, but I suspect that ALSA will not yet have > finished initting when rc.local is run. > > When I did an embedded project, I started my program using rungetty from > /etc/inittab instead of using rc.local > > Install rungetty, and then edit your /etc/inittab so that rungetty will log > in a user automatically on one of the virtual consoles, for example, log the > "embedded" user in to tty2: > > 2:2345:respawn:/sbin/rungetty --autologin embedded tty2 > > Then you can edit /home/embedded/.profile to run your program. > > --- > James Paige