Last active
June 26, 2018 13:37
-
-
Save Monsterovich/1ce37cc22c9896d202e97271de69bd6f to your computer and use it in GitHub Desktop.
Set different volume levels for each app in ALSA (fuck pulseaudio) + you can record sound from soundcard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Defaults | |
# | |
# Step 1: Put this file to $HOME | |
# Step 2: Configure your application http://www.zimagez.com/zimage/2017-03-1121-55-45.php | |
# Have fun! http://www.zimagez.com/zimage/2017-03-1121-56-31.php | |
# | |
# Defaults | |
# | |
pcm.dmixer { | |
type dmix | |
ipc_key 1024 | |
slave { | |
pcm "hw:0,0" | |
period_time 0 | |
period_size 1024 | |
buffer_size 4096 | |
rate 48000 | |
} | |
bindings { | |
0 0 | |
1 1 | |
} | |
} | |
# global volume | |
pcm.master { | |
type softvol | |
slave { | |
pcm "dmixer" | |
} | |
control { | |
name "Master" | |
card 0 | |
} | |
} | |
pcm.!default { | |
type plug | |
slave.pcm { | |
@func getenv | |
vars [ ALSA_PCM ] | |
default "out" | |
} | |
} | |
# | |
# Loopback support (modprobe snd-loop) | |
# | |
# to record and hear the output we need this | |
pcm.out { | |
type plug | |
slave.pcm "multi" | |
route_policy "duplicate" | |
} | |
pcm.multi { | |
type multi | |
slaves.a.pcm "loopback" | |
slaves.a.channels 2 | |
slaves.b.pcm "master" | |
slaves.b.channels 2 | |
bindings.0.slave a | |
bindings.0.channel 0 | |
bindings.1.slave a | |
bindings.1.channel 1 | |
bindings.2.slave b | |
bindings.2.channel 0 | |
bindings.3.slave b | |
bindings.3.channel 1 | |
} | |
# to change loopback volume | |
pcm.loopback { | |
type softvol | |
slave { | |
pcm "hw:Loopback" | |
} | |
control { | |
name "Loopback" | |
card 0 | |
} | |
} | |
# | |
# Applications | |
# | |
pcm.firefox { | |
type softvol | |
slave { | |
pcm "out" | |
} | |
control { | |
name "Firefox Master" | |
card 0 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment