An introduction to computer audio
In your media player you pick a song and press play.
The player gives a command to a Codec to convert the file to something the sound card can understand (PCM audio).
You can have multiple audio streams e.g. you have your music playing and another application kicks in, a system sound, a VOIP call, audio embedded in a web page, etc.
To play the streams simultaneously they must be mixed.
All OS have a mixer.
As a sound card can only run at one sample rate, all streams must have the same sample rate.
Any stream not having the default sample rate, has to be converted (sample rate conversion) before it is mixed.
All OS offer a sample rate converter.
Mixing, sample rate conversion, volume control, etc. are all DSP (Digital Signal Processing)
The algorithm chosen, the precision of the calculation (quantization error), efficiency (latency), etc. will have its impact on the sound quality.
The XP k-mixer is famous for its disastrous sound quality. Small wonder, 16 bits integers are very efficient in calculations but the precision is to low (quantization error)
Win7 has a mixer using 32 bits float.
OSX Core audio has a 64 bit audio path.
In case of Linux there is no standard mixer. It depends on the audio stack you are using.
Bypassing the OS DSP is a popular tweak.
Kernel streaming or ASIO on XP
WASAPI is the way on Win7
Media players using HOG mode (exclusive access), integer playback (bypassing the mixer) on OSX.
You might expect differences in sound quality between the operating systems.
Different implementations of the DSP will yield differences in sound quality.
A paper by dCs  clearly demonstrates this.
It also demonstrated that if you don't resample, both Win and OSX could deliver bit perfect output.
An often recommended practice is to play 1 and only 1 audio stream and play it at its native sample rate to avoid any artifacts from mixing and sample rate conversion.
This is called bit perfect output.
In this case the operating system doesn't do anything at all, no mixing, no sample rate conversion, no volume control.
In this scenario one might wonder if the operating system matters at all.
More information about configuring the audio of the OS can be found here.