#5 restructuring input audio source code