unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [tvraman@almaden.ibm.com: Re: Native play function slows down emacs on RH 7.3]
@ 2002-07-25 18:07 Richard Stallman
  2002-07-26 10:40 ` Gerd Moellmann
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2002-07-25 18:07 UTC (permalink / raw)


Is anyone interested in implementing asynchronous playing of sound in
Emacs?  Forking sounds like a rather heavyweight method; perhaps the
sound output facilities have asynchronous output features.  Gerd,
do you know what is available?

------- Start of forwarded message -------
From: TV Raman <tvraman@almaden.ibm.com>
Date: Tue, 23 Jul 2002 16:17:05 -0700
To: rms@gnu.org
Cc: tvraman@almaden.ibm.com, bug-gnu-emacs@gnu.org
Subject: Re: Native play function slows down emacs on RH 7.3
In-Reply-To: <200207161329.g6GDTWq22061@aztec.santafe.edu>
Reply-To: tvraman@almaden.ibm.com


I looked at the code in  src/sound.c --and things look okay with
respect to how the sound is played.

The problem is that the function as written is synchronous
- --i.e. returns only ater the sound is done playing 
- --which explains the slowness I perceived.

It might be useful to have the function parse its args, check the
validity of the sound data --and then 
fork to play the sound so emacs can continue what it is doing.
Richard Stallman writes:
 >     If you use the built-in play-sound function, 
 >     things feel  slower than when using (shell-command "play "...)
 > 
 >     It's hard to articulate the "feel slower" bit --
 >     but at least when I switched emacspeak to start using play-sound,
 >     the rest of emacs felt sluggish.
 > 
 > Can you investigate a little--by seeing what method Emacs uses to play
 > a sound, and what method the `play' program uses?  Maybe we're not
 > using the best method, or we might be using it wrong.
 > 
 > Unfortunately I know next to nothing about the facilities for playing
 > sound.

- -- 
Best Regards,
- --raman
- ------------------------------------------------------------
T. V. Raman:  PhD (Cornell University)
IBM Research: Human Language Technologies
Architect:    Conversational And Multimodal WWW Standards
Phone:        1 (408) 927 2608   T-Line 457-2608
Fax:        1 (408) 927 3012
Email:        tvraman@us.ibm.com
WWW:      http://www.cs.cornell.edu/home/raman
AIM:      TVRaman
PGP:          http://emacspeak.sf.net/raman.asc
Snail:        IBM Almaden Research Center,
              650 Harry Road
              San Jose 95120
------- End of forwarded message -------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [tvraman@almaden.ibm.com: Re: Native play function slows down emacs on RH 7.3]
  2002-07-25 18:07 [tvraman@almaden.ibm.com: Re: Native play function slows down emacs on RH 7.3] Richard Stallman
@ 2002-07-26 10:40 ` Gerd Moellmann
  2002-07-27 18:52   ` Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Gerd Moellmann @ 2002-07-26 10:40 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

> Is anyone interested in implementing asynchronous playing of sound in
> Emacs?  Forking sounds like a rather heavyweight method; perhaps the
> sound output facilities have asynchronous output features.  Gerd,
> do you know what is available?

I'm afraid I don't know.  I'm relatively sure that I didn't see
asynchronous playing of sound mentioned in the docs I found when I
wrote the code some years ago, but docs were pretty scarce and bad at
that time, so I wouldn't take it for granted that there in no such 
facility.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [tvraman@almaden.ibm.com: Re: Native play function slows down emacs on RH 7.3]
  2002-07-26 10:40 ` Gerd Moellmann
@ 2002-07-27 18:52   ` Richard Stallman
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Stallman @ 2002-07-27 18:52 UTC (permalink / raw)
  Cc: emacs-devel

    > Is anyone interested in implementing asynchronous playing of sound in
    > Emacs?  Forking sounds like a rather heavyweight method; perhaps the
    > sound output facilities have asynchronous output features.  Gerd,
    > do you know what is available?

    I'm afraid I don't know.  I'm relatively sure that I didn't see
    asynchronous playing of sound mentioned in the docs I found when I
    wrote the code some years ago, but docs were pretty scarce and bad at
    that time, so I wouldn't take it for granted that there in no such 
    facility.

Another possible technique would be to use multi-threading on
systems which support that.  Does anyone know how widespread
such support is now?

Another idea is that Emacs could launch a dedicated subprocess for
playing sounds, and then send a command to it for each sound.  The
subprocess would then do the system calls that actually play the
sounds.  This would be much more efficient than forking for each sound
to be played.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-07-27 18:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-25 18:07 [tvraman@almaden.ibm.com: Re: Native play function slows down emacs on RH 7.3] Richard Stallman
2002-07-26 10:40 ` Gerd Moellmann
2002-07-27 18:52   ` Richard Stallman

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).