Add ALSA RPI hack.

master
q3k 2013-07-14 18:29:19 +02:00
parent 640587a46e
commit 5f198c92cc
1 changed files with 8 additions and 0 deletions

View File

@ -71,6 +71,14 @@ play_again_at = time.time()
if __name__ == "__main__":
# are we a fucking rpi?
f = open("/proc/cpuinfo", "r")
d = f.read()
f.close()
if "BCM2708" in d:
print("We are on an rpi. Doing ALSA hack.")
os.system("amixer cset numid=3 1")
pygame.mixer.init()
pygame.display.init()
pygame.display.set_mode((1,1))