Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:Creative Voice File (VOC)

From ReverseEngineering.wiki
Format
Magic "Creative Voice File" 1A at 0
Extensions .voc
Endianness little
On this wiki Facts · Code · Notes · Topics

Creative Labs' Sound Blaster sample file (.voc): a 26-byte header "Creative Voice File" 0x1A with data offset, version (0x010A or 0x0114) and a check word, then blocks of one type byte and a 24-bit length (sound data, continuation, silence, marker, text, repeat start/end, extra info, new-format data), ending with block 0.

Overview

VOC is the sound effect and speech format of the Sound Blaster on DOS; many DOS and early Windows games ship digitised speech and effects as .voc files or as raw VOC data inside archives (for example Build engine GRP files, see Format:GRP (Build engine group file)). Compare Format:RIFF WAVE.

Header

See Fact:Creative Voice File (VOC)/struct/VOC file header. ScummVM also accepts a "VTLK" 4-character prefix before the header (8 bytes are read first; voc.cpp lines 40-51).

Blocks

See Fact:Creative Voice File (VOC)/enum/VOC block types. A block is one type byte and a 24-bit little-endian length, then the data. Type 0 ends the file, but a file may simply end without it, and ScummVM treats any type above 9 as a terminator because shipped files are broken in this way (voc.cpp lines 245-257).

Sample rate

Block 1 stores a one-byte divisor; the rate is 1000000 / (256 - divisor) (Unverified: ScummVM's getSampleRateFromVOCRate was not read, this is the documented formula). Block 8 (extra info) precedes a block 1 and carries a 16-bit divisor with the rate 256000000 / (65536 - divisor) (voc.cpp line 424); block 9 stores the rate directly as a 32-bit value.

Pitfalls

  • Version 0x0100 appears in a few shipped files (Day of the Tentacle German disk version, Simon the Sorcerer 2 French CD per the code comment) although it is not a valid VOC version (lines 65-68).
  • A sound data block following a block 8 uses the rate and format of the block 8 (lines 301-311).
  • Only codec 0 (8-bit unsigned PCM) is handled by ScummVM; other codecs (4-bit, 2.6-bit and 2-bit Creative ADPCM, A-law, u-law) exist in block 1 and 9. Unverified: codec numbering beyond 0.

Code & repositories

ScummVM (GPL-3.0-or-later) audio/decoders/voc.cpp and voc.h.

  • https://github.com/scummvm/scummvm @ 3f4203f8833f12615b0df5fa27f19d3c30d3e5d8 · license: GPL-3.0-or-later (declared by the contributor; GitHub's detector did not recognize COPYING)
    ScummVM: audio/midiparser_smf.cpp, audio/midiparser_xmidi.cpp and audio/decoders/voc.cpp parse SMF, XMIDI and Creative VOC data of many DOS and Amiga adventure games.
    Tested on: source read, not run: read only, source files at the pinned commit · checked 2026-10-19