LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-11-2012, 03:56 PM   #1
croftad1
LQ Newbie
 
Registered: Sep 2010
Distribution: slackware
Posts: 6

Rep: Reputation: 0
Delay before audio level changes take effect


In Slackware 14 I'm noticing a perceptible delay between the time the audio volume level is changed and when it takes effect. For example, if I use the mouse scroll wheel to change the volume in Amarok there is a half-second delay and then the audio level jumps to the new setting. I've also noticed that muting a video in SMplayer has a similar but more pronounced effect; there is a delay of up to two seconds before the volume is muted. Changing the volume level via Alsamixer does not cause a delay (that I can perceive). I had been using Slack 13.37 prior to installing Slack 14 fresh and I never noticed this before. Does anyone know a way to address this?
 
Old 11-11-2012, 04:39 PM   #2
qweasd
Member
 
Registered: May 2010
Posts: 436

Rep: Reputation: Disabled
I have this happening with 14.0 and mplayer.
 
Old 11-12-2012, 01:05 AM   #3
GasPipe
Member
 
Registered: Jul 2009
Location: Finland
Distribution: Slackware64-current
Posts: 55

Rep: Reputation: 19
Same here with VLC. When I haven't changed the output module and it was set to default the lag was almost intolerable. Sometimes it froze the video and audio just kept playing. It took about five seconds to change the volume.
Then I tried to change the output module to ALSA audio output and the delay is now tolerable. Not immediate but almost.

I'm using Nvidia HDMI audio and dmix ALSA plugin.

Last edited by GasPipe; 11-12-2012 at 01:07 AM.
 
Old 11-13-2012, 05:36 PM   #4
dwblas
Member
 
Registered: Jun 2011
Posts: 52

Rep: Reputation: Disabled
Audio and video playbacks use a buffer so anything read before the change, i.e anything in the current buffer, would not be affected.
 
Old 11-13-2012, 07:42 PM   #5
qweasd
Member
 
Registered: May 2010
Posts: 436

Rep: Reputation: Disabled
That figures. It's not that bad, by the way. I totally don't mind it and will probably do nothing to fix it.
 
Old 11-15-2012, 08:23 PM   #6
croftad1
LQ Newbie
 
Registered: Sep 2010
Distribution: slackware
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by dwblas View Post
Audio and video playbacks use a buffer so anything read before the change, i.e anything in the current buffer, would not be affected.
What you're saying makes sense but I don't think it applies here. As I said, with 13.37 I had no such issues. Same hardware, different result. The only thing that's changed is upgrading to 14. I'm not sure what exactly is causing the problem. Playing a mp3 with mpg123 and adjusting volume via alsamixer works as expected. I get instantaneous volume change. It seems like another layer is introducing lag. Amarok is setup to use the gstreamer backend. Could that have any effect? I don't remember how Amarok was configured in 13.37.
 
Old 01-13-2013, 05:14 AM   #7
GasPipe
Member
 
Registered: Jul 2009
Location: Finland
Distribution: Slackware64-current
Posts: 55

Rep: Reputation: 19
I think I found a solution.

Well for me VLC audio delay was tolerable but when I tried out Google Play Music service, the audio was stuttering so badly that I couldn't even think of using it. So I dug a little deeper to find a solution.
As I said earlier I'm using Nvidia HDMI audio and ALSA dmix plugin.

My asound.conf file looks like this:
Code:
pcm.dmixer {
  type dmix
  ipc_key 2048
  slave {
    pcm "hw:0,7" # Always use pure hw. dmix will reformat/resample audio.
    period_size 2048 # If you get stuttering/or non-working audio, fiddle around with these
    buffer_size 32768
    rate 48000 # HDMI, I'll assume 48kHz
    format S16_LE # Should be default for pretty much any soundcard.
  }
  bindings {
    0 0
    1 1
  }
}

pcm.!default {
  type plug
  slave.pcm dmixer
}
Of course, this is my config and it likely doesn't work as is to your setup but I bolded the options I changed in order to get it work. Previously they were much smaller.

I hope this helps somebody.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Purposely delay all audio? jsteel Linux - General 2 05-27-2011 03:11 AM
vlc audio delay raphtor Linux - Newbie 2 09-15-2008 04:57 PM
audio delay in vlc for first 22 seconds raphtor Linux From Scratch 0 09-06-2008 09:41 PM
MPlayer - can't delay audio! Ironica Linux - Software 0 05-29-2004 11:48 AM
Keyboard delay is too long and kbdrate seems to have no effect (RH8.0) szatki Linux - General 0 02-20-2004 10:21 AM


All times are GMT -5. The time now is 02:17 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration