Loud click on startup

*nix specific usage questions
digdogsdad
New Cone
New Cone
Posts: 3
Joined: 11 Apr 2024 12:50

Loud click on startup

Postby digdogsdad » 11 Apr 2024 13:11

I am on Linux Mint 21.2 Victoria. I have a small script that I use for Korean vocab practice, which uses cvlc, but there is always a loud click when I start the script and it plays the first file, which is a real pain if I have headphones on. After that, other files played by the script continue without the click. Is there any way of suppressing the click on startup? VLC sits on the taskbar after first run even tho' cvlc closes, but the click still happens at next start of script. It is playing m4a type files (one Korean word per file), and I have also noticed that on very short files cvlc sometimes (not often) cuts off the end of the file.

Here is my script:

#!/bin/bash
if [ "$1" == "" ]
then
echo Please enter page number.
else
PAGE=$(expr $(expr $1 / 2) \* 2)
DIRECTORY="./Korean/VisualDictionary/DK_VisualDictionary/P$(expr 1000 + $PAGE | cut -b 2,3,4)"

clear; echo Playing: Pages $PAGE and $(expr $PAGE + 1): Directory $DIRECTORY; #Debug line

#Loop forever (break with control-c)
while true
do
#We want to play files in different random order each time
for FILE in $(find $DIRECTORY -type f | sort -R)
do
#echo $FILE; #Debug Line
cvlc --no-loop --play-and-exit $FILE >/dev/null 2>&1

if [ "$2" == "" ]; then PAUSE="2"; else PAUSE="$2"; fi
sleep $PAUSE
done
done
fi

digdogsdad
New Cone
New Cone
Posts: 3
Joined: 11 Apr 2024 12:50

Re: Loud click on startup

Postby digdogsdad » 11 Apr 2024 13:48

I note it is not vlc on taskbar, it is audio control with an entry saying "vlc stopped"

Rémi Denis-Courmont
Developer
Developer
Posts: 15323
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Loud click on startup

Postby Rémi Denis-Courmont » 11 Apr 2024 14:05

VLC itself won't cause any clicks unless they're in the source audio track. This is usually caused by hardware and/or driver limitations, such as power management that VLC has no control over.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

digdogsdad
New Cone
New Cone
Posts: 3
Joined: 11 Apr 2024 12:50

Re: Loud click on startup

Postby digdogsdad » 11 Apr 2024 15:23

OK, I found a fix:

sudo tee /etc/modprobe.d/snd-hda-intel.conf <<<'options snd-hda-intel power_save=0'

Now I just get a single click on system startup and VLC does not click any more.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 47 guests