From: Embedded and RealTime Field Application Engineer <segrest@bobseg.ENET.dec.com>
Subject: Re: Anyone making noise ???
Date: Mon, 8 Jan 96 09:09:58 EST [thread overview]
Message-ID: <1a45f6f8d581d9e5f82a578962207d55.axp-list@archive.invalid> (raw)
Greetings,
I have been puttering around trying to get my Linux system to make noise when
windows are created or destroyed. It has been an interesting experience and I
thought others might be curious about my efforts.
With help I was able to locate a fairly large collection of sun sound files
(.au) on the sunsite archive. Note that these files come from the world of SUN,
they are not in the linux part of the tree. These files are attractive because
they can be sent directly to the /dev/audio device using the cat command.
The FvwmAudio module forks a process, passing it a command string (defined
with FvwmAudioPlayCmd) and the audio file you specify. The problem with just
setting the command string to /bin/cat is that there is no way to redirect the
output to /dev/audio after the audio file is appended.
While it is a bit of a hack, they way I solved the problem was to create a
new version of FvwmAudio. Near the bottom of FvwmAudio.c you will find two
lines that do all the work. Here is what they look like:
sprintf(buf,"%s %s", audio_play_cmd_line, sound_table[sound]);
sprintf(buf,"%s %s/%s", audio_play_cmd_line, audio_play_dir,
sound_table[sound]);
Here are the lines after I modified them:
sprintf(buf,"/bin/cat %s > /dev/audio", sound_table[sound]);
sprintf(buf,"/bin/cat %s/%s > /dev/audio",audio_play_dir, sound_table[sound]);
Brute force is ugly... but it will work until I get a chance to do it
better...
To have fvwm automatically start FvwmAudio, add the following line to the
.fvwmrc "InitFunction" definition:
Module "I" FvwmAudio
Then down near the bottom of .fvwmrc add a section to define the FvwmAudio
environment variables. Here is one that I have been playing with:
########################## Audio ##########################################
# FvwmAudio Configuration
*FvwmAudioPlayCmd /bin/cat
*FvwmAudioDir /usr/local/lib/sounds
# *FvwmAudioDelay 2
*FvwmAudio startup sonar.au
*FvwmAudio shutdown sub_dive_horn.au
*FvwmAudio add_window boing.au
# *FvwmAudio raise_window whoosh.au
# *FvwmAudio lower_window return.au
*FvwmAudio focus_change clink.au
*FvwmAudio destroy_window explosion-1.au
*FvwmAudio iconify return.au
*FvwmAudio deiconify whoosh.au
# *FvwmAudio toggle_paging
# *FvwmAudio new_page
# *FvwmAudio new_desk
# *FvwmAudio configure_window
# *FvwmAudio window_name
# *FvwmAudio icon_name
# *FvwmAudio res_class
# *FvwmAudio res_name
# *FvwmAudio end_windowlist
I hope someone else finds these comments useful....
Bob Segrest
next reply other threads:[~1996-01-08 14:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-01-08 14:09 Embedded and RealTime Field Application Engineer [this message]
-- strict thread matches above, loose matches on Subject: below --
1996-01-06 19:25 Anyone making noise ??? Embedded and RealTime Field Application Engineer
1996-01-06 20:30 ` Erik Troan
1996-01-06 16:51 Embedded and RealTime Field Application Engineer
1996-01-06 18:18 ` Jay Estabrook - Alpha Migration Tools - LINUX Project
1996-01-06 18:56 ` Erik Troan
[not found] <Pine.LNX.3.91.960105121802.14335A-100000@redhat.com>
1996-01-05 17:49 ` Jay Estabrook - Alpha Migration Tools - LINUX Project
1996-01-05 19:02 ` Erik Troan
1996-01-05 16:48 Embedded and RealTime Field Application Engineer
1996-01-05 17:18 ` Erik Troan
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox