It seems that the audio buffer is not cleared (or something like that) - If I once the ball around the audio/wave bounce follows the ball. If I stop the ball, the audio continues (though the graph refects the ball's position)
Yes, the buffer is not cleared. As you identified, the ball's position is continuously written in the buffer, its evolution on the X axis is mapped to values on the left channel, and its evolution on the Y axis onto values on the right channel, so you are building up the sound as you leave the ball bouncing for a while. If the ball stops, we stop writing into the buffer, but we don't stop reading from it.