Hi Aaron,

Aaron Said:
Nod, I just figured those sounds were queued up for the engine to play,
and all you had to doo to make it stop was just send the direct x a command to stop
and it would make everything stop.

Tom Says:
No, it certainly doesn't. I know some game developers such as Justin and Dan use to load all of there common speech files into sound buffers and when they wanted to stop speech they would have a function that stops any or all of the voice files that are being played back. This is certainly one possible solution to the whole speech problem.

Aaron Said:
I see now it doesn't quite work like that. From
your explanation it looks like you have a while loop that keeps going and checking to see if the sound is playing. When the sound is not playing the loop plays the
next sound and somehow in so doing initiates itself again.

Tom Says:
That's not exactly how it works, but close enough to get the point across. The while loop that monitors the speech state is actually what is holding up the active game thread. It has the input threads attention and why the game stops responding while it is active.

Aaron Said:
I don't know if the input
still workks but a though I have is an if statement inside that could check to see if a variable interupt is set to 1. If it were, it could pull out of the loop. Only problem there is is there enough input support while this is going on to be able to set a variable if I press a key while it's looping. And, would it slow the speech down to be checking that variable every time it loops. I know in vb it does. In vb if I loop something the whole program seems to stop and give all it's attention to
the loop. If that's the case input support wouldn't get any attention.

Tom Says:
That is true. What is happening here is that the speech is currently operating on the same thread/process as the master input loop so wwhenever you start speech the input and everything else operating on that thread waits for the speech to stop. Fortunately, since I am using C-Sharp I do have an option open to me that VB 6 programmers don't have. Are you familiar with multithreading? Basically, what multithreading does is you split your application into multiple concurrent streams that allows the program to perform several different actions virtually at the same time. If I put speech on its own thread, input on another, then it would be possible to press a keywhich tells the sspeech thread to shut up. Also doing this would allow you to continue walking while checking direction, location, whatever without the speech interfering with your movement. So this is definitely something I need to look in to for Beta 3. What I am saying here is I think it is possible to interrupt the speech, but I just need some time to work out the technicalities. I've never done this before so it could take me anything from an hour or a entire month to come up with the right solution. Although, I am fairly certain I'll be able to do it by splitting the game into concurrent threads. That almost certainly has to be part of the solution right there.
HTH



---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gam...@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to