Skip to content

Instantly share code, notes, and snippets.

@Eriner
Created December 10, 2015 14:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Eriner/ed68d07acab1e5cfae47 to your computer and use it in GitHub Desktop.
Save Eriner/ed68d07acab1e5cfae47 to your computer and use it in GitHub Desktop.
# dsnooped input
# dsnooped allows multiple applications to use an input device (microphone)
# without dsnoop, devices are exclusive, and the mic can only be used by one app at a time.
pcm.dsnooped {
type dsnoop
ipc_key 5978293 # must be unique for all dmix plugins!!!!
ipc_key_add_uid yes
slave {
pcm "hw:Microphone"
channels 2
period_size 1024
buffer_size 4096
rate 48000
periods 0
period_time 0
}
}
# dmixed output
# this operates under the same principles as dsnoop
# it prevents device-exclusivity.
pcm.dmixed {
type dmix
ipc_key 1568423
slave {
pcm "hw:SB,0"
period_time 0
period_size 1024
buffer_size 4096
rate 48000
}
}
# this 'combines' both input and optput devices into a single pseudo-device
pcm.asymd {
type asym
playback.pcm "dmixed"
capture.pcm "dsnooped"
}
# this sets the above combined device as the default input/output
pcm.!default {
type plug
slave.pcm "asymd"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment