Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: Anyone making noise ???
@ 1996-01-08 14:09 Embedded and RealTime Field Application Engineer
  0 siblings, 0 replies; 10+ messages in thread
From: Embedded and RealTime Field Application Engineer @ 1996-01-08 14:09 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Anyone making noise ???
@ 1996-01-06 19:25 Embedded and RealTime Field Application Engineer
  1996-01-06 20:30 ` Erik Troan
  0 siblings, 1 reply; 10+ messages in thread
From: Embedded and RealTime Field Application Engineer @ 1996-01-06 19:25 UTC (permalink / raw)


Ok, I'll bite......

Where does one find .au files ???

Any pointers greatly appreciated......

Bob Segrest

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Anyone making noise ???
@ 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
  0 siblings, 2 replies; 10+ messages in thread
From: Embedded and RealTime Field Application Engineer @ 1996-01-06 16:51 UTC (permalink / raw)


Greetings,

I swapped my 8-bit sound blaster card out and replaced it with a 16-bit sound 
blaster.  Maelstrom works and as suggested earlier, I can cat a .au file to 
/dev/audio without any problems.

I have done some poking around and would like to get the FvwmAudio module 
working.  There appear to be some pieces missing (rplay.h) from the fvwm source 
kit that allow the FvwmAudio module to build with the "builtin-rplay" options.  
I suspect that this is because the more accepted practice is to use an external 
application to generate sounds on command from FvwmAudio.

This brings me to a point where I am looking for a tool to gererate sound 
effects.  Does anyone have a tool to play .wav files on an Alpha ???

Bob Segrest

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Anyone making noise ???
@ 1996-01-05 16:48 Embedded and RealTime Field Application Engineer
  1996-01-05 17:18 ` Erik Troan
  0 siblings, 1 reply; 10+ messages in thread
From: Embedded and RealTime Field Application Engineer @ 1996-01-05 16:48 UTC (permalink / raw)


Greetings,

Has anyone used a sound card with RedHat Linux on an Alpha ???

I build a new kernel with sound card support and installed a 8-bit sound blaster 
card.  If I do a cat /dev/sndstat the card appears to be configured...  The 
sound functions do not appear to be in the fvwm distribution or at least are not 
apparent in the .fvwmrc file that I am using.

I tried running Maelstrom and it produces the following error:

 Mixer: Can't write to audio device: I/O error

How do I verify that the hardware and kernel are set up right ???  Is there a 
test program of some sort that someone has verified ???

Any help or pointers greatly appreciated...

Bob Segrest

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

end of thread, other threads:[~1996-01-08 14:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.3.91.960105121802.14335A-100000@redhat.com>
1996-01-05 17:49 ` Anyone making noise ??? Jay Estabrook - Alpha Migration Tools - LINUX Project
1996-01-05 19:02   ` Erik Troan
1996-01-08 14:09 Embedded and RealTime Field Application Engineer
  -- strict thread matches above, loose matches on Subject: below --
1996-01-06 19:25 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
1996-01-05 16:48 Embedded and RealTime Field Application Engineer
1996-01-05 17:18 ` Erik Troan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox