Removing the print SOXOUT $buf; line seems to fix the issue as far as I'm able to reproduce it.
As far as I can see it looks like you're misunderstanding the sox interface.
..
In reply to Re: I need some help with open2
by Joost
in thread I need some help with open2
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |