Audio Causing Lag? (Solved)
I just finished adding speech to my program, to make it more user friendly, however, when an event occurs and the program responds by talking to you, the program stops responding (it doesn't crash, just other events wont occur) until the wav file has finished its job. I was thinking that maybe the problem was because I gave the wav files CD quality, if I gave them the lowest quality, would the problem be solved?
PS. Is there a program that changes the quality of a sounds file? Preferably a WAV file?
Update: I did some test and the quality of a WAV file does not make a difference. So I came up with an idea, since I'm using wxPython. Would it be a good idea to use an MDI window to hold my program in and another program (window) that plays the sounds? Or does anyone have a better idea?
I figured out that by using the Timer control from the threading module and setting the wait time to 0 seconds, the error no longer occurs. .
Last edited by †Yegg†; May 8th, 2005 at 02:12 PM.
I was going to say that it sounds like you needed to launch the audio playback in a seperate thread--but looks like you got around it--
wow dude tell me how to add music to a programm!!! PLZ, im making an rpg and ive been trying to find out how, show me an example of a function that starts music or someting PLZ
Actually I didn't add music, I added WAV files. Adding music is possible though. I'm not sure if the method I used can do that though. I would look around on aspn.activestate.com under the Python Cookbook for more help. pycode.com is also a great site to look at.