Volume control digital or analog to headphone jack?
The volume control on a computer (specifically, your MacBook) is usually handled by your audio API, which on Mac OS X is CoreAudio. All computers these days will act like this, but I seem to recall one Toshiba laptop of my parents’ running Windows 98 with a physical dial on the side for audio. Obviously this is not practical today due to modern laptops getting thinner and digital audio outputs such as SPDIF and HDMI audio. I might be rambling a bit, but I hope this answers your question.