home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux.suse      Suse is actually not that bad      138,051 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 137,167 of 138,051   
   Carlos E.R. to Malcolm   
   Re: Simple audio player.   
   18 Mar 21 12:05:25   
   
   From: robin_listas@es.invalid   
      
   On 18/03/2021 01.05, Malcolm wrote:   
   > On Thu, 18 Mar 2021 00:59:22 +0100   
   > "Carlos E.R."  wrote:   
   >   
   >> On 18/03/2021 00.10, Sidney_Kotic wrote:   
   >>> I'm looking for a little command-line audio player.  I need the   
   >>> ability to run as a cron job, use *.m3u playlists, play from a url,   
   >>> and some type of equalizer.   
   >>   
   >> Run as a cron job is not easy: I haven't managed to do it reliably.   
   >> What works one year stops working the next. Or it may only work with   
   >> the same user that has the desktop and while it has the desktop. Or   
   >> maybe even not then, because the cronjob doesn't have the appropriate   
   >> environment vars.   
   >>   
   >>   
   >>   
   > Hi   
   > Systemd service and timer... cron is dead ;)   
   >   
      
   That is irrelevant, the basic problem is the same.   
      
   In my machine, "root" can not play sound, no permission:   
      
      
   Telcontar:~ # play abitsilly.wav   
   play FAIL formats: can't open output file `default': can not open audio   
   device: Connection refused   
   Telcontar:~ # aplay abitsilly.wav   
   ALSA lib pcm_dmix.c:1099:(snd_pcm_dmix_open) unable to open slave   
   aplay: main:828: audio open error: No such file or directory   
   Telcontar:~ # paplay abitsilly.wav   
   Connection failure: Connection refused   
   pa_context_connect() failed: Connection refused   
   Telcontar:~ #   
      
   Telcontar:~/ThingsNeededForBoot # vlc abitsilly.wav   
   VLC is not supposed to be run as root. Sorry.   
   If you need to use real-time priorities and/or privileged TCP ports   
   you can use vlc-wrapper (make sure it is Set-UID root and   
   cannot be run by non-trusted users first).   
   Telcontar:~/ThingsNeededForBoot # mplayer abitsilly.wav   
   MPlayer 1.2.r38170-Packman-7 (C) 2000-2020 MPlayer Team   
   ...   
      
   but no sound.   
      
      
      
      
   Telcontar:~ # cat hal9.au > /dev/audio   
   Telcontar:~ #   
      
      
   and no sound.   
      
      
   cer@Telcontar:~> play /usr/share/sounds/Mine/abitsilly.wav   
      
   /usr/share/sounds/Mine/abitsilly.wav:   
      
     File Size: 148k      Bit Rate: 256k   
      Encoding: Signed PCM   
      Channels: 1 @ 16-bit   
   Samplerate: 16000Hz   
   Replaygain: off   
      Duration: 00:00:04.61   
      
   In:100%  00:00:04.61 [00:00:00.00] Out:73.8k [      |      ]   
   Clip:0   
   Done.   
   cer@Telcontar:~>   
      
   (and we have sound)   
      
      
      
   Ok, so perhaps use "su - desktopuser -c playsomething", but at least I,   
   I want to play things before the desktop is up with a user.   
      
      
      
      
   Cron (or timer) is worse: no terminal assigned, so echoing the bell   
   character will not sound.   
      
   cer@Telcontar:~> whatis bell   
   bell (n)             - Ring a display's bell   
   cer@Telcontar:~>   
      
      
      
   The first step, if using "pulse", would be to run it as independent daemon.   
      
      
      
   --   
   Cheers, Carlos.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca