fixed bug in termbuff_swap
sine wave
full double buffering for console