Was looking at the digital audio in Another World (aka Out of This World) and found it pretty fascinating.
The game has an all-digital soundtrack and supports digital playback on SoundBlaster, AdLib(!), and PC Speaker(!) I was curious to see how it manages to do digital sound across all these devices and came away pretty impressed.
For SoundBlaster it's straightforward, since the SB supports digital audio directly. However, the way the game runs the audio is unusual: it configures the PIT to generate 10,000 interrupts/second, and manually feeds a single 8-bit sample to the SB on each interrupt, rather than using PC's DMA controller to send data like almost every other game.
For PC Speaker, it uses a similar technique. But since the PC speaker is essentially a 1-bit DAC, it can't just feed an 8-bit sample to it. Instead, it changes the timer connected to the speaker, which is normally in "square wave" mode, to run instead in "one shot" mode. This means whenever a new timer count is written, the timer drives the speaker low until the count is expired, then the timer goes high again and remains there. By programming different values, the game essentially does pulse-width modulation at 10kHz to produce surprisingly reasonable digital sound.
For the AdLib, which is an FM-only chip, it uses a clever hack. It programs one channel for playback with instant attack and forever sustain, and starts a note playing. Then, almost immediately afterwards, it changes the note's frequency to 0, which causes the phase counter to stop counting and essentially locks the channel's output to whatever position within the sine wave it was when the frequency was nullified. With proper timing, it will be near its peak. At this point, the game can alter the channel's "total level" (aka volume) and change the magnitude of the locked output, basically making it into a DAC. The total level is only 6 bits, so it's lower fidelity than the SoundBlaster, but still sounds pretty decent.