fix mutex locking and replaced static with csound global variable
fix mutex locking and replaced static with csound global variable

nikhilsinghmus/csound,nikhilsinghmus/csound,nikhilsinghmus/csound,nikhilsinghmus/csound,nikhilsinghmus/csound,nikhilsinghmus/csound,nikhilsinghmus/csound,nikhilsinghmus/csound,nikhilsinghmus/csound,nikhilsinghmus/csound