What component is the infinite volume knob?
You are describing a rotary encoder.



Figure 1. A typical rotary encoder.

These consist of two switching contacts (mechanical or optical) which give out a train of pulses offset by 90&deg;. 



Figure 2. The output waveform and the resultant count when rotating clockwise and anti-clockwise.

The offset allows determination of rotation direction. If, for example, we check the status of B every time A goes positive we can say:


If B is '0' then increment the count by 1.
If B is '1' then decrement the count by 1.


See Rotary encoder to 2 buttons for more and a sample circuit.