Problem with distorted sound in X application

Carsten Haitzler raster at rasterman.com
Fri Jul 9 14:35:41 UTC 2021


On Fri, 09 Jul 2021 10:56:24 -0300 sawbona at gmx.net said:

We're not the right people to ask. X has nothing to do with audio. But it
sounds like your app needs to be updated to newer audio APIs at some point.

> Hello:
> 
> ---
> I am posting this question here at X.org because it is related to an
> X-application. Please advise if it has to go elsewhere.
> ---
> 
> I have recently set up an interesting, simple/lightweight system mail
> notification for my Devuan Beowulf installation ...
> 
> ~$ uname -a
> Linux devuan 5.10.0-0.bpo.3-amd64 #1 SMP Debian 5.10.13-1~bpo10+1 (2021-02-11)
> x86_64 GNU/Linux
> ~$
> 
> ... which got me more or less what I wanted.
> 
> Simple in that it was MTA only (no POP/SMTP/etc.) and lightweight because it
> had to be independent and do just that: notify me of system mail. ie: not
> integrated to a panel or desktop.
> 
> I was forgetting to check my system mail regularly.
> 
> The application is called Coolmail, it's ca. 1995 (!).
> 
> Besides firing up a mail utility such as mutt, mailx, etc., it has is the
> option of playing a sound alert. ie: a system beep through the on-board
> hardware's piezo or a sound file through external speakers.
> 
> I cannot seem to get the system beep to be loud enough and the application is
> rather dated so it uses OSS drivers, support for which was dropped in around
> the 4.15 kernel version. (?)
> 
> My installation has Pulse Audio installed and I've never paid much attention
> to it save to raise the main volume when I'm listening to music or watching a
> movie, my box does no games.
> 
> In any case, I was unable to get a *.au sound file played as coolmail
> complained of not being able to write to /dev/audio which was not present in
> my file system.
> 
> After a while I came across a post (sorry, lost the link) that gave
> indications for installing the oss-compat package, which I promptly I did.
> 
> Doing so removed osspd-pulseaudio.
> And now I have /dev/audio in my system, along with /dev/dsp and /dev/mixer
> which were already present:
> 
> ~$ ls -l /dev/ | grep audio
> crw-rw----+ 1 root audio      14,   4 Jul  4 15:53 audio
> crw-rw----+ 1 root audio      14,   3 Jul  4 15:53 dsp
> crw-rw----+ 1 root audio      14,   0 Jul  4 15:53 mixer
> ~$
> 
> Now the *.au file coolmail could not play is played but unrecognizably
> distorted even if I drop the volume, so that would not seem to be the cause.
> 
> And I am still getting an error from the application:
> 
> ~$ coolmail -v
> Coolmail 1.3 watching file: /var/spool/mail/groucho
> Coolmail: Error writing to /dev/audio.
> --- snip ---
> :~$
> 
> The file plays normally via Audacious, VLC and aplay:
> 
> ~$ aplay -v /home/groucho/Downloads/ding.au
> Playing Sparc Audio '/home/groucho/Downloads/ding.au' : Signed 16 bit Big
> Endian, Rate 48000 Hz, Stereo
> ALSA <-> PulseAudio PCM I/O Plugin
> Its setup is:
>   stream       : PLAYBACK
>   access       : RW_INTERLEAVED
>   format       : S16_BE
>   subformat    : STD
>   channels     : 2
>   rate         : 48000
>   exact rate   : 48000 (48000/1)
>   msbits       : 16
>   buffer_size  : 24000
>   period_size  : 6000
>   period_time  : 125000
>   tstamp_mode  : NONE
>   tstamp_type  : GETTIMEOFDAY
>   period_step  : 1
>   avail_min    : 6000
>   period_event : 0
>   start_threshold  : 24000
>   stop_threshold   : 24000
>   silence_threshold: 0
>   silence_size : 0
>   boundary     : 6755399441055744000
> ~$
> 
> I did find a post from back in 1999 with the same problem but it never
> received a follow up.
> 
> http://www.linuxmisc.com/5-linux-hardware/5cb2489886e85949.htm
> 
> Any idea on how to fix this?
> 
> Thanks in advance,
> 
> JHM
> _______________________________________________
> xorg at lists.x.org: X.Org support
> Archives: http://lists.freedesktop.org/archives/xorg
> Info: https://lists.x.org/mailman/listinfo/xorg
> Your subscription address: %(user_address)s
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
Carsten Haitzler - raster at rasterman.com



More information about the xorg mailing list