This code uses librtlsdr for a basis, and I have created an AM/FM/WBFM/SSB receiver application with this stuff. I call the application radioDiags. The application sends demodulated data to stdout as raw PCM formtted as signed 16-bit little endian integers to stdout at a rate of 8000S/s.