From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: [tvraman@almaden.ibm.com: Re: Native play function slows down emacs on RH 7.3] Date: Thu, 25 Jul 2002 12:07:27 -0600 (MDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200207251807.g6PI7RC07663@aztec.santafe.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1027620534 4391 127.0.0.1 (25 Jul 2002 18:08:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 25 Jul 2002 18:08:54 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17Xn2i-00018h-00 for ; Thu, 25 Jul 2002 20:08:52 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17XnI7-0003DH-00 for ; Thu, 25 Jul 2002 20:24:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17Xn2z-0005vD-00; Thu, 25 Jul 2002 14:09:09 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17Xn1M-0005dr-00; Thu, 25 Jul 2002 14:07:28 -0400 Original-Received: from aztec.santafe.edu (aztec [192.12.12.49]) by pele.santafe.edu (8.11.6+Sun/8.11.6) with ESMTP id g6PI7YB05952; Thu, 25 Jul 2002 12:07:34 -0600 (MDT) Original-Received: (from rms@localhost) by aztec.santafe.edu (8.10.2+Sun/8.9.3) id g6PI7RC07663; Thu, 25 Jul 2002 12:07:27 -0600 (MDT) X-Authentication-Warning: aztec.santafe.edu: rms set sender to rms@aztec using -f Original-To: emacs-devel@gnu.org, gerd@gnu.org Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6040 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6040 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 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 -------