| View previous topic :: View next topic |
| Author |
Message |
gspr Tux's lil' helper


Joined: 07 Sep 2002 Posts: 127
|
Posted: Mon Aug 08, 2005 12:41 am Post subject: ALSA and dmix buffers, skippy sound at times |
|
|
Hi.
I recently tossed aRTS out my computer for good. I am now running an ALSA/dmix setup with the following asound.conf:
| Code: | # This is ripped straight from the amarok wiki at http://amarok.kde.org/wiki/index.php/Setting_up_Dmix_for_ALSA
# I really should understand what's going on here!
# At any rate, this seems to work if programs with ALSA output are pointed to the "dmixer" mixer.
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0" # make sure this matches the actual device
#period_time 0 # not necessary since ALSA 1.0pre
period_size 2048 # Use a power of 2
buffer_size 32768 # must be a multiple of period_size
#rate 44100 # not necessary; let alsa-lib handle this
}
bindings {
0 0
1 1 # bind only the first 2 channels
}
}
pcm.duplex
{
type asym
playback.pcm "dmixer"
capture.pcm "dsnoop"
}
# Everything shall be dmixed, so redefine "default":
# Note that this is _not_ a good idea, since dmix doesn't allow mmap access currently
#pcm.!default {
# type plug
# slave.pcm "duplex"
#}
# OSS via aoss should d(mix)stroyed:
pcm.dsp0 {
type plug
slave.pcm "duplex"
}
ctl.dmixer {
type hw
card 0
} |
(Anybody see anything wrong here?)
For my audio playing experience, I use amaroK with the Gstreamer backend. The computer is a Centrino laptop, and it dynamically clocks the CPU up and down as needed. This means that my CPU often runs at 600 MHz while playing music. If I start maximizing/minimizing windows, the audio will (sometimes) skip for a bit. The speedstepping daemon has some latency when it comes to clocking up to meet such fluctuating demands for processing power, and it could be causing the skips. However, I think running at the minimal 600 MHz oughta be enough for skip-free audio playback.
Any ideas? I've tried messing around with Gstreamer options in the amaroK config, but to no avail.
PS: Dmix has proven really hard for me to grasp. Anybody feel like explaining the meaning of the things in my asound.conf? I usually like to understand what's going on when something Just Works. _________________ "People said I should accept the world. Bullshit! I don't accept the world." -- RMS.
"We are to admit no more causes of natural things than such as are both true and sufficient to explain their appearances." -- Newton. |
|
| Back to top |
|
 |
Tlaloc Guru


Joined: 21 Feb 2005 Posts: 451 Location: Europe - Alps - Tyrol
|
Posted: Mon Aug 08, 2005 7:22 am Post subject: |
|
|
If I remember exactly you do not need an asound.conf anymore as alsa-1.09b does dmix by default. I have thrown mine away and playback is still fine. And in my experience the xine engine has given me much less problems regarding latency and skipping. If you do not have all your music in musepack format you should give the xine engine a try, it is more mature than gstreamer atm.
Bye, Valentin.
Last edited by Tlaloc on Mon Aug 08, 2005 2:24 pm; edited 1 time in total |
|
| Back to top |
|
 |
gspr Tux's lil' helper


Joined: 07 Sep 2002 Posts: 127
|
Posted: Mon Aug 08, 2005 11:31 am Post subject: |
|
|
Very interesting. Thank you. _________________ "People said I should accept the world. Bullshit! I don't accept the world." -- RMS.
"We are to admit no more causes of natural things than such as are both true and sufficient to explain their appearances." -- Newton. |
|
| Back to top |
|
 |
F-0_ICE l33t


Joined: 06 Dec 2004 Posts: 679
|
Posted: Fri Sep 23, 2005 12:33 am Post subject: |
|
|
hi. do you use the kde notifications if so how did you get them working without arts ? _________________ ~AMD64
AMD: Athlon64 X2 3800+
2G PC3200
ATI: RADEON HD 4350
Linksys: WMP54G
True Knowledge is Best Acquired Through Experience. |
|
| Back to top |
|
 |
Tlaloc Guru


Joined: 21 Feb 2005 Posts: 451 Location: Europe - Alps - Tyrol
|
Posted: Sun Sep 25, 2005 8:53 am Post subject: |
|
|
| Code: | #!/bin/bash
case `echo "$1" | sed -re "s/.*\.(.*)$/\1/"` in
ogg)
ogg123 -d alsa09 "$1" &
;;
mp3|mpg|mpeg)
mpg321 "$1" &
;;
wav|au)
aplay "$1" &
;;
esac
|
Thats the bash script I set to call as external player in the Control Center under Sound & Multimedia -> System Notifications. Remember to compile kdelibs with the arts use flag.
Bye, Valentin. |
|
| Back to top |
|
 |
F-0_ICE l33t


Joined: 06 Dec 2004 Posts: 679
|
Posted: Thu Sep 29, 2005 12:43 am Post subject: |
|
|
oh...man... and i finished updating my world to exclude the arts use flag not too long ago. when i use your script i don't have any audio from knotify. at any rate once kde 4.0 comes out this problem will no longer be of any concern to anyone. BTW thanks for the reply.
--UPDATE--
i found out the using /usr/bin/play worked great as an external player heres the thread
http://forums.gentoo.org/viewtopic-t-325888-highlight-.html and thanks for the help. _________________ ~AMD64
AMD: Athlon64 X2 3800+
2G PC3200
ATI: RADEON HD 4350
Linksys: WMP54G
True Knowledge is Best Acquired Through Experience. |
|
| Back to top |
|
 |
|