Thanks for the code. It seems to work.

However i don't find the results satisfactory. I've tried some dance music and there is still a little delay between the two channels. What kind of music did you try? Did you notice any delays? The delay isn't very big (i guess 20ms or so) but it is still noticable. I tried fixing it but i do not have much experience with threading etc.. so i got stuck.

maybe you can test some dance music? Do you think there is any way to solve this? Can we sync the buffers in some way?