Go to advanced search

by java7nerd
Wed Jul 30, 2014 7:25 pm
Forum: Python
Topic: Set the audio option (HDMI/headphones) in Python for pygame?
Replies: 7
Views: 5768

Re: Set the audio option (HDMI/headphones) in Python for pyg

Also, of note: after calling

Code: Select all

pygame.mixer.init()
It takes about one and a half seconds before the mixer is ready to start outputting sound. So if you play a sound immediately it gets eaten if the sound is short.
by java7nerd
Wed Jul 30, 2014 7:22 pm
Forum: Python
Topic: Set the audio option (HDMI/headphones) in Python for pygame?
Replies: 7
Views: 5768

Re: Set the audio option (HDMI/headphones) in Python for pyg

Okay, I found out the problem. Audio doesn't work unless you input this shell command first if you want HDMI: amixer -c 0 cset numid=3 2 or if you want headphones: amixer -c 0 cset numid=3 1 The python games that come with the Pi runs a shell script first which prompts you to choose an option and th...
by java7nerd
Tue Jul 29, 2014 7:00 pm
Forum: Python
Topic: Set the audio option (HDMI/headphones) in Python for pygame?
Replies: 7
Views: 5768

Re: Set the audio option (HDMI/headphones) in Python for pyg

Are you trying to get the sound on your HDMI TV or from the analog headphone socket? Have you set the volume above zero (set to eleven)? http://www.raspberrypi.org/forums/viewtopic.php?f=66&t=24943 I'm using HDMI. have not yet tried headphones. Volume is fine, as other sounds play and it plays when...
by java7nerd
Tue Jul 29, 2014 6:27 pm
Forum: Python
Topic: Set the audio option (HDMI/headphones) in Python for pygame?
Replies: 7
Views: 5768

Set the audio option (HDMI/headphones) in Python for pygame?

I'm trying to play a sound using pygame. I found this solution online: import pygame pygame.mixer.init() sound = pygame.mixer.Sound("/usr/share/scratch/Media/Sounds/Animal/Meow.wav") sound.play() However, I hear nothing. After messing around I found that if I run one of the Python Games that comes w...
by java7nerd
Sat Jun 08, 2013 2:09 pm
Forum: Troubleshooting
Topic: Key setup
Replies: 9
Views: 1720

Re: Key setup

I think I've fixed it, was told to type this in to the console and it seems to work now:

Code: Select all

setxkbmap gb
by java7nerd
Fri Jun 07, 2013 6:05 pm
Forum: Troubleshooting
Topic: Key setup
Replies: 9
Views: 1720

Re: Key setup

I belive I'm having a similar issue with my mk520 Logitech Wireless Combo (UK). It's a UK keyboard, which I configured as UK in the raspi-config, but it's acting American, e.g. when press shift-3 (should be £ as is displayed on the keyboard) it types the hash symbol #. I have been told to check the ...

Go to advanced search