Fixed audio acquisition and painting threads synchronization