always initialize global variables
http://stackoverflow.com/a/19400390
adjusted libsndfile headers
added OSX system header for fd_set