On Oct 31, 2004, at 11:56 AM, Carlo Rubini wrote:
Hello,
how to stop a speech process started buy <speak(myString)> ?
I call the StopSpeech method from the mouseDown event of an editField
but the speech process doesnt stop.
(mSpeechChannel is a property)
1. Method: stopSpeech:
dim res as integer
if mSpeechChannel <> 0 then
res = DisposeSpeechChannel(mSpeechChannel)
if res<>0 then
msgBox "DisposeSpeechChannel() returned "+Format(res, "-#")
end if
mSpeechChannel = 0
end if
2. Function: DisposeSpeechChannel
Declare Function DisposeSpeechChannel Lib SpeakLib (chan as Integer)
as Integer
return DisposeSpeechChannel(channel)
Corrections/suggestions welcome, thanks
How did you get a value for mSpeechChannel? If you're using the Rb
function Speak, I don't see how to get it. Assuming that you have a
valid speech channel value, I'd think that StopSpeech would be the
function to use; DisposeChannel releases resources and that sort of
thing.
--------------
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|