[pygame] Sound not playing at startup
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
Re: [pygame] Sound not playing at startup
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
Re: [pygame] Installation on Beaglebone Black w Angstrom Linux
Christian, I think that's a genius solution. Thank you! My hesitation in installing Ubuntu has been pin muxing, but it's worth the difficulty. Thanks again, Arthur On Monday, July 22, 2013 5:03:28 PM UTC-4, Chris Cherry wrote: Arthur, I had success with Pygame on the Beaglebone Rev. 5 using the Joystick module, however I used Ubuntu as Angstrom was ill suited to... Well anything I wanted to use it for. Have you considered changing OS? Cheers, Christian Sent from my Windows Phone -- From: arthur...@gmail.com javascript: Sent: 22/07/2013 21:06 To: pygame-mirror...@googlegroups.com javascript: Subject: [pygame] Installation on Beaglebone Black w Angstrom Linux I've been trying to install Pygame on the Beaglebone Black running Angstrom Linux with a Cortex-A8 processor. Although the online opkg repository lists python-pygame as available for arm7a architecture, searching via the beaglebone does not find python-pygame. After installing all of the dependencies listed on the online opkg repository, except for libsmpeg, I tried to install from source. However, the installation can't find libsdl-mixer, which I have already installed (v libsdl-mixer-1.2-0 - 1.2.11-r0.1) into /usr/lib. Installation output: root@beaglebone:~/Desktop/pygame-1.9.1release# LOCALBASE=/usr/lib python setup.py install WARNING, No Setup File Exists, Running config.py Using UNIX configuration... Hunting dependencies... sh: smpeg-config: command not found WARNING: smpeg-config failed! SDL : found 1.2.15 FONT: not found IMAGE : not found MIXER : not found SMPEG : not found PNG : found JPEG: found SCRAP : found PORTMIDI: not found PORTTIME: not found I tried to set LOCALBASE, as suggested in the documentation, but this did not affect the installation output. I only hope to use the sound mixer portions of pygame. Can someone help me install it on the Beaglebone Black? Many thanks, Arthur In case it's useful, here's the rchitecture from beaglebone opkg: root@beaglebone:~/Desktop/SDL_mixer-1.2.12# opkg print-architecture arch all 1 arch any 6 arch noarch 11 arch arm 16 arch armv4 21 arch armv5 26 arch armv5-vfp 31 arch armv5e 36 arch armv5e-vfp 41 arch armv6-vfp 46 arch armv7a 51 arch armv7a-vfp 56 arch armv7a-vfp-neon 61 arch beaglebone 66 Pygame opkg link: http://www.angstrom-distribution.org/repo/?pkgname=python-pygame