help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs audio problem


From: Adam Jiang
Subject: Re: Emacs audio problem
Date: Sat, 2 Feb 2013 20:59:03 +0900

It is not odd at all.

Comparing to the original code, play-sound blocks the current thread to force you wait until it finished, start-process will folk another thread to finish the work.


2013/2/2 Dan Espen <despen@verizon.net>
Jason Rumney <jasonrumney@gmail.com> writes:

> On Friday, 1 February 2013 02:32:05 UTC+8, Dan Espen  wrote:
>>
>> (setq ring-bell-function (lambda ()
>>
>>  (play-sound-file "/home/me/audio/tap2.au")))
>>
>> This works, but has an undesirable side effect.
>>
>> It looks like keystrokes are ignored until after the sound plays.
>>
>> Anyone have a suggestion?
>
> Use start-process to have an external program play the sound.

You're right.  Thanks.

This is working for me:

(setq ring-bell-function (lambda ()
 (start-process "ding" nil "play" "/home/me/audio/tap2.au")))

Odd that invoking an external program and reading a file
over and over works better but it does.

--
Dan Espen


reply via email to

[Prev in Thread] Current Thread [Next in Thread]