Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 935d9f5

Browse files
[[ Mac64 ]] Update revspeech to use the Carbon event loop
Instead of Classic! In the 64-bit world, the Carbon event loop still exists.
1 parent 587d22c commit 935d9f5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

revspeech/src/osxspeech.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,14 @@ bool OSXSpeechNarrator::SpeechStop(bool ReleaseInit)
256256
StopSpeech(spchannel);
257257
do
258258
{
259-
EventRecord t_record;
260-
WaitNextEvent(0, &t_record, 1, NULL);
259+
// Run an inner main loop until the speech has finished processing
260+
EventRef t_event;
261+
OSStatus t_status = ReceiveNextEvent(0, NULL, 1, true, &t_event);
262+
if (t_status == noErr)
263+
{
264+
SendEventToEventTarget(t_event, GetEventDispatcherTarget());
265+
ReleaseEvent(t_event);
266+
}
261267
}
262268
while(SpeechBusy() > 0);
263269

0 commit comments

Comments
 (0)