Modified Demo code to support 2 channels with hardware frontends