I am wondering should I write unit test for everything. There are some classes is very difficult to write unit test. For example, I am writing some program for handling audi
Code that capture and replay audio cannot be unit-tested (albeit you could test that the capture method returns an error when called when the class isn't successfully bound to a resource).
However, unless you simply write the captured sound to disk the code that invokes your capture and play classes certainly can.
Two pieces of advice: