title: Simulate Microphone (virtual mic)
body: <p>I've got a problem where I need to "simulate" microphone output. </p>
  
  <p>Data will be coming over the network, decoded into PCM and basically needs to be written into the mic - which then other programs can read/record/whatever.</p>
  
  <p>I've been reading up on alsa but information is pretty sparse. The file plugin seemes promising - I was thinking of having a named pipe as "infile" which I could then deliver data to from my application. I can't get it to work however (vlc/audacity just segfault).</p>
  
  <pre><code>pcm.testing {
    type file
    slave {
      pcm {
        type hw
        card 0
        device 0
      }
    }
    infile "/dev/urandom"
    format "raw"
  }
  </code></pre>
  
  <p>Are there any better ways of doing this? Any suggestions on alsa plug-ins (particularly the file plugin)?</p>