all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ivan Andrus <darthandrus@gmail.com>
To: emacs-devel@gnu.org
Subject: Can't get speechSynthesizer:didFinishSpeaking: to run on OS X
Date: Tue, 22 Jun 2010 18:26:34 -0500	[thread overview]
Message-ID: <3CB67123-8D98-425F-AAA7-F4C40F6C39A7@gmail.com> (raw)

I would like to add GNUstep/Cocoa speech synthesis to my local copy of emacs.  I know this is an GNUstep/OS X only feature and that it will probably never make it into emacs.  I also know about emacspeak and such, but I just want something very simple to play around with.

So far I can start and stop speech, but I have been unable to get the didFinishSpeaking callback to work.  I have implemented an ObjC class (in nsfns.m) which implements

- (void)speechSynthesizer:(NSSpeechSynthesizer *)sender didFinishSpeaking:(BOOL)success 

and I have set an instance as a delegate to an NSSpeechSynthesizer object, but it never fires.  If I call it manually as

[[speech_synthesizer delegate] speechSynthesizer: speech_synthesizer didFinishSpeaking: YES];

it works, so I don't think there is a problem with the callback, or the delegate.  I read at 
http://lists.apple.com/archives/cocoa-dev/2009/Feb/msg00624.html
that asynchronous callbacks rely on the runloop.  I think Emacs.app does some weird things with the runloop, so my question is, what must I do to get this to work?  Is it even possible?  Does Emacs.app even use the runloop?  Is it worth the effort?  I'm not an expert in either Cocoa/GNUstep or emacs development.

I can send the code if it's helpful, but I thought someone might know offhand what the problem is and and could point me in the right direction to fix it.

Thanks,
Ivan


             reply	other threads:[~2010-06-22 23:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-22 23:26 Ivan Andrus [this message]
2010-06-23  7:42 ` Can't get speechSynthesizer:didFinishSpeaking: to run on OS X Adrian Robert
2010-06-23 21:30   ` Ivan Andrus
2010-06-23 22:44     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CB67123-8D98-425F-AAA7-F4C40F6C39A7@gmail.com \
    --to=darthandrus@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.