Re: Sound (Audio) Goofed Up In 1.8.11

Geoff Burling (llywrch@agora.rdrop.com)
Tue, 25 Jun 2002 18:35:05 -0700 (PDT)


On Sun, 23 Jun 2002 drharlan@pacbell.net wrote:

> I wonder if anyone has had this problem with the 1.8.11 source.  After
> successfully sompiling and installing it, the Audio module seems to
> want to pick the second sound file listed in the audio file when it
> starts up, instead of the first one.  My audio file has this as the
> first few lines:
>
> #------------------------------------------------------------------------
> # Audio
> #
> # This will stream contents of the sound file directly to
> # /dev/audio :  definitely don't want this one. (this is my comment
> after trying it)
>
> # see ./configure --with-soundplayer to set your player proggy
> *AudioPath                      /usr/share/sounds
> #
> *AudioDelay                     0
> *Audio  startup                 meepmeep.au
> *Audio  shutdown                porky.wav
> *Audio  add_window              toggled.wav
> etc, etc,
> #-----------------------------------------------------------------------
> Version 1.8.10, when compiled the same way, will play the above files
> for the corresponding event, but 1.8.11 plays "porky.wav" instead of
> "meepmeep.au" when AfterStep starts up.
>
> Any clue as to what's going on ?
>
> By the way, I have the Yamaha on board audio and I'm using OSS-396d
> sound drivers.
>
So someone is using AS with sound. My labors earlier this year at fixing
a few of the bugs with this module (& the bug fixes I submitted to the
next release) will be appreciated. :)

The following diff applied to Audio.c will not only fix this problem
(caused by a change in the data structure defined in include/module.h),
but also remove a bit of cruft in Audio.c:

8<=====================================================================

65c67
< RPLAY        *rplay_table[MAX_SOUNDS];
---
> RPLAY        *rplay_table[MAX_MESSAGES + MAX_BUILTIN];
81a84,86
> /* Event mask - we want all events */
> #define mask_reg MAX_MASK
>
126d130
<         "new_theme",
164a169
>       char         *display_name = NULL;
182c187
<       fd[0] = fd[1] = ConnectAfterStep (MAX_MASK);
---
>       fd[0] = fd[1] = ConnectAfterStep (mask_reg);

=======================================================================

Further, the audio configuration file in ~/G/L/A assumes that unless told
otherwise you will use the rplay program to listen to sound files, an
assumption that can cause some sound files to sound more like a rusty
chainsaw than the recorded sound. The solution for this is to comment
out or remove the following line from the audio config file:

*AudioPlayCmd                   builtin-cat

(In order to properly fix this in the code, I would need to understand
how configure builds audio from audio.in . . . a project I have been
putting off until Sasha has stabilized afterstep-stable. Which he has.)

Geoff

_______________________________________________
The AfterStep Window Manager for X User's Mailing List
http://mail.afterstep.org/mailman/listinfo/as-users