December 16, 2017, 04:46:51 AM
Welcome, Guest. Please login or register.

If you are not part of the solution...You are part of the precipitate.

Author Topic: .asoundrc || /etc/asound.conf loopback for micspam.  (Read 610 times)

jc0n

  • Guest
.asoundrc || /etc/asound.conf loopback for micspam.
« on: September 10, 2015, 11:08:06 PM »
This alsa config I wrote loops all audio output through a capture device that you can use to micspam, mix into your desktop capture, and more. It also lets you set environment variables $ALSAIN and $ALSAOUT to bypass programs that don't support virtual devices natively  ;D

Code: [Select]
pcm.!default {
    type asym
    playback.pcm {
        @func getenv
        vars [ ALSAOUT ]
        default "plug:outloop"
    }
    capture.pcm {
        @func getenv
        vars [ ALSAIN ]
        default "plug:dsnoop"
    }
}

pcm.outloop {
    type route

    slave.pcm {
        type multi

        slaves.a { pcm "dmix:0,0,0"; channels 2; }
        slaves.b { pcm "plug:\"dmix:Loopback,0,0\""; channels 2; }
        bindings.0 { slave a; channel 0; }
        bindings.1 { slave a; channel 1; }
        bindings.2 { slave b; channel 0; }
        bindings.3 { slave b; channel 1; }
    }

    ttable.0.0 1
    ttable.1.1 1
    ttable.0.2 1
    ttable.1.3 1
}

pcm.inloop {
    type dsnoop
    ipc_key 42069 #blaze it
    slave.pcm "hw:Loopback,1,0"
}

This was mostly a post excuse to test out my signature. Enjoy!
« Last Edit: September 10, 2015, 11:22:12 PM by jc0n »

Offline GalaxyNinja

  • Global Moderator
  • Elite
  • *****
  • Posts: 1732
  • Internets: +96/-0
  • My password is **********
Re: .asoundrc || /etc/asound.conf loopback for micspam.
« Reply #1 on: September 11, 2015, 09:09:52 AM »
Nice jc0n, and welcome to the forum.  :)
Technically you could have just said, "hello" and tested out your signature, but we always appreciate another script!  ;)
A computer is only as strong as its user! -R4v3n