0

I have a working VU meter plugin but wish to combine it with a spectrum analyzer however both have their own /etc/asound.conf. I want to combine the two together but nothing I have tried works because of the loopback that the spectrum requires. I've spent several days working on this but have to ask for help now.

/etc/asound.conf - spectrum anaylyzer:

pcm.!default {
   type plug       # <-- no { here
   slave.pcm {
       type multi
       slaves {
           a { channels 2 pcm "hw:0,0" }  # the real device
           b { channels 2 pcm "hw:Loopback,0" }  # the loopback driver
       }
       bindings {
           0 { slave a channel 0 }
           1 { slave a channel 1 }
           2 { slave b channel 0 }
           3 { slave b channel 1 }
       }
   }
   ttable [
       [ 1 0 1 0 ]   # left  -> a.left,  b.left
       [ 0 1 0 1 ]   # right -> a.right, b.right
   ]
}

/etc/asound.conf - VU meter:

 pcm.!default {
        type plug
        slave.pcm "softvol_and_pivumeter"
}

ctl.!default {
        type hw
        card 0
}

pcm.pivumeter {
        type meter
        slave.pcm "hw:0,0"
        scopes.0 pivumeter
}

pcm.softvol_and_pivumeter {
        type softvol
        slave.pcm "pivumeter"
        control {
                name "PCM"
                card 0
        }
}

pcm_scope.pivumeter {
       type pivumeter
        decay_ms 500
        peak_ms 400
        brightness 128
        output_device bargraph-stereo
}

pcm_scope_type.pivumeter {
        lib /usr/local/lib/libpivumeter.so
}

pcm.dsp0 pivumeter

Any help will be greatly apreciated.

linuxgnuru
  • 142
  • 5

0 Answers0