To Achieve draw wave form from speaker outputs.

Hi,

i have develop winfrom application using media file, recording and editing with wave form. receiving input through microphone is possible draw wave form the same not possible when tried to record output of a system (Speakers) find the below code and suggest better way to achieve the same.Mic codes used: