rachoo / connectbot

Automatically exported from code.google.com/p/connectbot
Apache License 2.0
0 stars 0 forks source link

Audible terminal bell #84

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please add support for an audible terminal bell. 

A simple beep or a configurable sound should be played when a bell
(Ctrl-G, 0x07) character is received from the remote. Optional
vibration would be nice too.

Original issue reported on code.google.com by istvan.m...@gmail.com on 12 Nov 2008 at 5:42

GoogleCodeExporter commented 9 years ago
Attached is the patch I use. Still needs to be hooked up to preferences to make 
it
optional and need to find a good sound file to be used for res/raw/beep.ogg

Original comment by istvan.m...@gmail.com on 25 Nov 2008 at 9:38

Attachments:

GoogleCodeExporter commented 9 years ago
Was this patch specifically to trigger a beep for ^G or for some other 
situations?  
Thanks.

Original comment by lauren4...@gmail.com on 3 Jan 2009 at 5:51

GoogleCodeExporter commented 9 years ago
Yes, the patch is to trigger a beep (or whatever sound file you
provide during the build) whenever a control-G character arrives, for
example:

/bin/echo -e "\a"

makes it beep.

What's still missing is runtime configuration: the ability to
enable/disable this function and perhaps it could also allow the user
to choose a different bell sound without having to recompile.

Original comment by istvan.m...@gmail.com on 3 Jan 2009 at 6:03

GoogleCodeExporter commented 9 years ago
When I initially tried to apply this patch, errors suggested that some of that 
code 
was already in place, though of course I'm not getting any ^G beeps.  Is there 
a 
particular revision level that the patch is appropriate for?  I'll admit I 
haven't 
really dug into the code yet.  

I had applied the patch (or tried to) via Eclipse.  Thanks.

Original comment by lauren4...@gmail.com on 3 Jan 2009 at 6:12

GoogleCodeExporter commented 9 years ago
The patch was against an earlier svn version but I just checked, it
still applies cleanly against the current head (r164). I don't use
eclipse but from a unix command line you should be able to apply it
like this:

patch -p0 -s <somedir/connectbot-bell.patch

Run this in the connectbot directory where you see src and res as
subdirs. If you don't have luck with this either then you could just
add the lines manually, it only touches two files adding a handful of
lines.

You will also have to provide a sound file as res/raw/beep.ogg (mp3 or
wav might work too, haven't tried)

Original comment by istvan.m...@gmail.com on 3 Jan 2009 at 6:30

GoogleCodeExporter commented 9 years ago
I didn't realize that the sound file was needed at build time.  That may have 
been 
my problem.  I'll take another look.  Thanks!

Original comment by lauren4...@gmail.com on 3 Jan 2009 at 6:34

GoogleCodeExporter commented 9 years ago
Got this working fine, thanks.  In a quick review, I haven't been able to find 
the 
code that beeps for font size changes (vol up/down).  I'd like to remove that 
beep.  
This wasn't obviously in the font size change routines so I must be missing it.

Original comment by lauren4...@gmail.com on 12 Jan 2009 at 6:54

GoogleCodeExporter commented 9 years ago
For the volume button beep try the patch I am attaching. Calling
setVolumeControlStream(AudioManager.STREAM_MUSIC) seems to avoid the
beep. This is not a great solution, later Android versions might for
example add a sound effect when changing the music volume but it works
for now.

Original comment by istvan.m...@gmail.com on 12 Jan 2009 at 7:30

Attachments:

GoogleCodeExporter commented 9 years ago
Yes, works like a charm for the time being.  Thanks.

Original comment by lauren4...@gmail.com on 12 Jan 2009 at 11:48

GoogleCodeExporter commented 9 years ago
I can't get SoundPool to work without causing a deadlock if there are many 
beeps at
once. I think I'll put this one on ice until it's a public API.

http://www.mail-archive.com/android-developers@googlegroups.com/msg12008.html

I've attached what I initially used. I had also downloaded KDE_Bell_Connect.ogg 
for
the sound.

Original comment by kenny@the-b.org on 19 Jan 2009 at 1:12

Attachments:

GoogleCodeExporter commented 9 years ago
Issue 94 has been merged into this issue.

Original comment by kenny@the-b.org on 19 Jan 2009 at 1:50

GoogleCodeExporter commented 9 years ago
According to donio, release 1.5 of the OS has fixed the issue with deadlock on
SoundPool. I'll put this in soon.

Original comment by kenny@the-b.org on 5 May 2009 at 10:19

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Sorry for deletes on this comment, had problems getting long URL in and finally 
shortened it.  The audible bell mods, either using soundpool or mediaplayer, 
worked 
fine in conjunction with the autoreconnect mods previously, but now routinely 
crash 
after a reconnect (if the display is in its "frozen" state) under Android 1.5 
-- 
please see:

http://bit.ly/pb9Ln

Original comment by lauren4...@gmail.com on 31 May 2009 at 10:26

GoogleCodeExporter commented 9 years ago
Added audible terminal bell along with vibration and notification while in 
background
in r258

Original comment by kenny@the-b.org on 2 Jun 2009 at 9:00

GoogleCodeExporter commented 9 years ago
Can an option be added to sound the bell as well when a ^G is sent while a 
terminal is running in the 
background?  This makes sense to me in cases where you're running an irc client 
(screen and irssi) and want to 
be notified of PMs and such while you're not actively looking at your phone.

Original comment by not...@gmail.com on 12 Nov 2009 at 10:55

GoogleCodeExporter commented 9 years ago
notmjp, I filed issue 208 which you might want to look at, requesting that and 
another 
change. I haven't had time to follow up on it though.

Original comment by gwillen@gmail.com on 12 Nov 2009 at 11:07

GoogleCodeExporter commented 9 years ago
I have a version that already does this (just rebuilt off 421).  It also uses a 
more 
audible sound for ^G since I use it for routine mail notifications.  Let me 
know if 
you want a copy.

Original comment by lauren4...@gmail.com on 12 Nov 2009 at 11:07