If you landed here from a search engine, this is probably what you are seeing:
- A game CD ripped as
.cue/.binboots or installs, but its CD music is silent in a QEMU guest — Quake, MechWarrior 2, The Secret of Monkey Island and every other game that streams Red Book audio from the disc. - Pointing
-cdromat the.cuefile gives a disc the guest cannot read, so you convert to.isoand lose the audio tracks entirely. - The Windows CD Player says there is no audio disc, and MSCDEX-based DOS games play no music.
- In Windows XP, “Enable digital CD audio for this CD-ROM device” is refused with an unsupported-device error.
1. Why QEMU has no CD audio
QEMU's ATAPI emulation (hw/ide/atapi.c) treats every disc as 2048-byte data sectors. There is no track list beyond one data track, no READ CD for 2352-byte audio frames, no PLAY AUDIO, no sub-channel position, and the capabilities page tells the guest the drive cannot do CD-DA at all. The block layer does not parse .cue sheets either, so the image the drive sees is a text file.
A real drive offers audio two ways, and old guests depend on both:
- Digital audio extraction (DAE) — the OS reads raw 2352-byte PCM frames with
READ CDand mixes them itself. This is what Windows XP'sredbook.sysdoes when “digital CD audio” is enabled. - Analog playback — the OS sends
PLAY AUDIOand the drive plays the track on its own, out through the cable to the sound card. DOS (MSCDEX) and Windows 9x games with Sound Blaster drivers know nothing else.
2. What the patches add
| Area | Added |
|---|---|
| Image format | Native .cue sheets with single or split .bin files: MODE1/2048, MODE1/2352, MODE2/2048, MODE2/2336, MODE2/2352, AUDIO, INDEX 00/01, PREGAP/POSTGAP. Referenced files are resolved next to the .cue, case-insensitively. |
| Digital (DAE) | READ TOC formats 0/1/2, READ CD and READ CD MSF with 2352-byte PCM, READ DISC INFORMATION, and the CD-DA / CD-DA Accurate bits in MODE SENSE 0x2A. |
| Analog | PLAY AUDIO (10), (12) and MSF, PAUSE/RESUME, STOP, READ SUB-CHANNEL, READ HEADER, and the volume page (MODE SENSE/SELECT 0x0E), rendered at 44.1 kHz stereo through a QEMU audiodev. |
| Disc changes | Playback state is reset on every media change, so CD Player sees the new disc. |
Plain .iso images keep the unmodified upstream code path.
3. Which path each guest uses
| Guest OS / audio driver | Digital (DAE) | Analog | Notes |
|---|---|---|---|
| DOS (MSCDEX) | not available | works | No DAE stack in the OS; games send PLAY AUDIO. |
| Windows 95 | not available | works | No redbook.sys / WDM audio. |
| Windows 98 SE + Sound Blaster (VxD) | not available | works | No WDM mixer path, so the digital checkbox is greyed out. Analog is required. |
| Windows 98 SE + WDM driver (AC97) | works (opt-in) | works (default) | Some old games keep better timing on analog. |
| Windows XP | works (recommended) | works | Digital follows master volume and mute; enables WMP visualisation and ripping. |
The DOS, Windows 95 and Sound Blaster rows follow from how those drivers work. The guests actually run are listed under Tested on.
4. Using it
git clone https://gitlab.com/qemu-project/qemu.git
cd qemu
git checkout -b cue-bin 5f664cd37a # tested base (QEMU 11.1.50)
git am /path/to/qemu-cue-bin/patches/000[1-3]-*.patch
./configure --target-list=i386-softmmu --enable-pipewire
ninja -C build
./build/qemu-system-i386 -enable-kvm -M pc -m 512 \
-audiodev pipewire,id=pw0 \
-device AC97,audiodev=pw0 \
-hda win98.qcow2 \
-cdrom /path/to/game.cue
- With exactly one
-audiodev, the CD-ROM attaches to it by itself. With several, pick one with-global ide-cd.audiodev=pw0. - With no audio backend at all, playback still advances at 75 frames per second, so a game waiting for a track to end does not hang.
- Swap discs from the monitor with
change ide1-cd0 next.cue. For Windows 98 SE, sendejectand wait about 1.5 seconds first:changecloses the tray again within a millisecond, and Explorer can swallow the media-change notification before CD Player polls.
5. Windows XP refuses “Enable digital CD audio”
This happens on an existing XP VM that was installed or booted on an unpatched QEMU. On those boots redbook.sys read the capabilities page, saw no CD-DA support, and cached the answer. XP never probes again, so the patched drive is still reported as unable:
HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318}\0000\DigitalAudio
CDDASupported = 0
CDDAAccurate = 0
Fix it one of two ways:
- Re-detect the drive (recommended). In Device Manager, right-click QEMU DVD-ROM under DVD/CD-ROM drives → Uninstall, then Action → Scan for hardware changes (or reboot). Tick the checkbox again.
- Clear the cache. Delete the
DigitalAudiosubkey (the0000instance number may differ), or set both values to1, and reboot.
A fresh XP install on the patched QEMU is not affected.
6. Verifying it without a game
The repository's tests/ boots a minimal Linux guest that drives the CD-ROM through the kernel's CD ioctls: the TOC, the ISO9660 data track, a DAE read compared byte for byte with the host .bin, the volume page, and analog PLAY AUDIO MSF through playing → paused → playing → completed. The host captures the analog output with the wav audiodev and checks that it is not silent. A script builds a synthetic disc (a data track plus a 20-second tone), so no game image is needed.
cd tests
./fetch-deps.sh
python3 make-test-disc.py
QEMU=/path/to/qemu-system-i386 ./run-linux-test.sh "" pc # IDE
QEMU=/path/to/qemu-system-i386 ./run-linux-test.sh "" q35 # AHCI
Not submitted upstream
QEMU declines contributions that include or derive from AI-generated content. These patches were written with Claude, so they are not in QEMU. They are offered as-is under QEMU's licence (GPL-2.0-or-later).
Tested on
QEMU 11.1.50 (5f664cd37a) on Ubuntu 26.04 with KVM.
- The Linux test passes on
pcandq35with the synthetic disc and with real mixed-mode game rips (11 tracks; 25 tracks withPREGAPandINDEX 00). A plain.isostill works. - Windows 98 SE (
pc, AC97): four game CDs, including Quake, MechWarrior 2 and The Secret of Monkey Island, recognised as audio discs and played by CD Player on the analog path, across disc changes. - Windows XP (
q35, AC97): Digital CD Audio enabled after the registry fix above, and audio CDs played through it. - Not run: DOS, Windows 95, Sound Blaster drivers.
The patches apply cleanly together with the Wayland scaler and parallel-port series; see the combined build guide.