unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Emacs audio problem
@ 2013-01-31 18:32 Dan Espen
  2013-02-01 13:38 ` Jason Rumney
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Espen @ 2013-01-31 18:32 UTC (permalink / raw)
  To: help-gnu-emacs


I'm using Emacs 24.1.1 on Fedora Linux.

I while back, I started missing audible indications of errors so I
added this:

(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.

For example, if I arrow up to beyond the top of a file 
I hear some taps.  If I try to do something else with the keyboard
before the sounds stop, the key strokes are ignored.

This doesn't happen running emacs -q.

I think the flushing of keystrokes may be normal,
just not noticeable without something in ring-bell-function.

I tried to speed up ring-bell-function by:

(setq my-sound (get-string-from-file "/home/me/audio/tap2.au"))
and then using:
(play-sound `(sound :data ,my-sound :volume 40))

This seems like it helps.

I added :volume 40 because, for some reason, the sound played too loud.
Coding the volume had the undesirable side effect of turning down (or up)
the volume on all sounds on the system.

That's no good either.

Anyone have a suggestion?

-- 
Dan Espen


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

end of thread, other threads:[~2013-02-02 11:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-31 18:32 Emacs audio problem Dan Espen
2013-02-01 13:38 ` Jason Rumney
2013-02-01 17:08   ` Dan Espen
2013-02-02  3:08   ` Dan Espen
2013-02-02 11:59     ` Adam Jiang

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).