Reply
Thread Tools
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#1
anyone out there played with pygame audio.

I have it working nice for playing sound samples, but there is a slight crack as the sound starts to play, and a slight crack when I stop the sound. in between the sound plays beautiful. I get the same problem on my linux development box so its not a n900 issue.

it must be related to the mixer stop and start.

all thoughts would be welcomed.
__________________
N900_Email_Options Wiki Page
 
Posts: 67 | Thanked: 15 times | Joined on Apr 2010
#2
I'll permit my self to reuse this thread.

I'm trying to use pygame.music.play() and it sort of works, except it plays only the first second of audiofiles..

Any hints?
 
Posts: 67 | Thanked: 15 times | Joined on Apr 2010
#3
pygame.mixer.music.play() that is..
 
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#4
can you post the pygame init commands. It might be related to the size of the buffer, as the pygame music actually streams rather than plays.
__________________
N900_Email_Options Wiki Page
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#5
Originally Posted by mikec View Post
anyone out there played with pygame audio.

I have it working nice for playing sound samples, but there is a slight crack as the sound starts to play, and a slight crack when I stop the sound. in between the sound plays beautiful. I get the same problem on my linux development box so its not a n900 issue.

it must be related to the mixer stop and start.

all thoughts would be welcomed.
You need to be sure that the sink has been emptied before you try to play other sounds. PulseAudio is very sensitive to this so you need to make sure that everything is either played or flushed.

Google for "pulseaudio simple example" and you'll get everything you need. I used this to create the audio backend for footify.
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:59.