-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
"Ben Wing" <benwing666(a)gmail.com> writes:
On 3/29/06, Sebastian Freundt <hroptatyr(a)sxemacs.org> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jerry James <james(a)xemacs.org> writes:
>
> > Steve Youngs <steve(a)sxemacs.org> wrote:
> >> Interesting how this thread has come up... we're currently doing
> >> surgery on sound in SXEmacs.
> >
> > Cool. Are you making it part of the normal event processing system? I
> > was awfully disappointed when I went to look at the sound code and found
> > that it is entirely separate from normal events. I even thought briefly
>
> Hm, why should normal events interact here? We use pthreads to trigger
> some external libraries which do all the useful stuff for us. And at the
> moment we are about to establish (elisp) sentinels which are called when
> `events' (like stopping, seeking, or the like) happen to the stream. But
> since such events are of external nature I cannot see how to wrap them
> into lisp events. Can you? :)
when you say "external" do you mean "need to be handled asynchronously in
lisp"? if so, then yes you can't put them in lisp events. but if no, then
The `need to be handled' is arguable, we support both asynchronous (==
pthreaded) and synchronous play. But basically asynchronous handling is
preferred.
you should use the same mechanism we currently use in order to
convert ^G
under TTY's (which arrives as a signal) to a lisp event -- basically, we
select() on a pipe that the signal handler writes to.
Hm, pipes, however, seem to be a good idea. What if the thread-trigger
(the function that pthread_create()s) installs a pipe which the thread
writes to and the event poller listens on that pipe.
On the other hand having a sentinel function, is it even necessary to use
the event mechanism? What's the benefit?
ben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFELOY5lMmhrILJOQ4RAqqFAJ4t304bdSlyRNf7tFNB/rJHldUQcgCcCYOl
s/45WhShry/jliqtacI+KFM=
=7ppW
-----END PGP SIGNATURE-----