ALSA - capture pcm data from /dev/snd/pcmC0D0p
<p>I am new to ALSA. I want to capture the pcm data sent to /dev/snd/pcmC0D0p and write it to a file. Once data is written to a file, i want to encode and stream the data. Can some one let me know how to go about it. Any sample code snippet will be helpful.</p>

<p>For Ex, when i receive an incoming call on my android handset, i want to capture the ringtone that is being played to a file, encode and stream it.</p>
