You are not logged in.
I'm playing with this basic setup in ~/.asoundrc:
defaults.pcm.dmix.rate 44100
pcm.!default {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 4096
}
}But when i try to play something, it still defaults to 48000.
mpv audiocheck.net_sweep_10000Hz_22030Hz_-3dBFS_10s.wav -ao alsa
[..]
AO: [alsa] 48000Hz stereo 2ch s16Adding "rate 44100" to the slave section make it works, but what if i'd want to change a bunch of slaves rates at once?
What is the point of "defaults.pcm.dmix.rate"?
Thanks.
Last edited by kokoko3k (2016-07-07 08:03:29)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Man, duck debugging is really something...
I swear, before posting my question i tried hard to solve the problem; but just after hitting the submit buttons, new ideas comes to mind and i figured out it all.
"defaults.pcm.dmix.rate" just affects the default alsa configuration/the default mainline-shipped dmix defined in /usr/share/alsa/pcm/dmix.conf
So, looking at that file, i undestrood that it uses the "@func refer" directive to get default values, and so here is my working .asoundrc
mixing_rate=48000
pcm.!default {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 4096
rate {
@func refer
name mixing_rate
}
}
}Yep, it is like using script global variables, nice!
Last edited by kokoko3k (2016-07-07 08:06:00)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline