Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Moy
Newbie


Joined: 06 Oct 2015
Posts: 1

PostPosted: Tue Oct 06, 2015 4:24 pm   

%comcreate and #call blocking the main thread
 
A little bit of googling revealed that you can easily have CMUD do TTS

Code:
#var sapi %comcreate("Sapi.SpVoice")
#call @sapi.Speak("Stuff and Junk")


However when something like this is being called, the main CMUD thread is being blocked, as in I cannot type, or see text that's happening at once.

Is there any work around to have the #call run in another thread so one could simple use TTS without locking on the main thread, or is there a better alternative to using the Sapi.SPVoice com object?



Edit:

Well, it looks like Speak(TXT, FLAGS) has a flag for making it async. So I guess I don't really quite need to know now if there's an unblocking mode for this, but if it is at all possible, I'd still like to know in case of something else in the future.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Tue Oct 06, 2015 6:31 pm   
 
putting
#WAIT 0
before a long script that might otherwise cause CMUD to hang will usually shunt the code off into its own #THREAD and allow you to still do things while it processes.

Have to admit, i have not dealt much with COM objects.
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net