added new thread safe mechanism for sending data to and from Csound:also add standalone mode