#1
  1. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154

    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 01:12 PM.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Location
    Colorado, USA
    Posts
    68
    Rep Power
    10
    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--
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2005
    Location
    canada, B.C.
    Posts
    12
    Rep Power
    0

    Music


    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
  6. #4
  7. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    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.

IMN logo majestic logo threadwatch logo seochat tools logo