VOC (audio codec)

from Wikipedia, the free encyclopedia
Creative Voice File (VOC)
File extension : .voc
MIME type : audio / x-voc
Magic number : Creative Voice File
Developed by: Creative Labs



Creative Voice , filename extension .VOC (in DOS -üblicher 8.3 notation) or .vocis an audio format for digital audio data for developed in the 1990s Sound Blaster - sound cards from Creative Labs .

The format was initially limited to 8-bit audio and was expanded to 16-bit audio with the Sound Blaster 16 ( container format ). In Little Endian, the audio data are usually encoded with PCM or ADPCM .

construction

Original format (8-bit)

The file format consists of a 26-byte header and a series of subsequent data blocks that contain the audio information. The byte order is little endian .

VOC header
Offset ( hex ) Length (in bytes) content
0x00 19th ASCII stringCreative Voice File
0x13 3 EOF : 1A 1A 00(hexadecimal)
0x16 2 Version (Major, Minor), hexadecimal;
For example 0x010a:, Version 1.10
0x18 2 Validation : version number + 0x1234 , hexadecimal;
For example:0x1129

Data blocks follow the header. Each data block begins with a type byte that describes the content of the data, followed by 3 bytes for the size of the data (as an integer ). With two of the 9 defined types, the subsequent size of the data is missing, so that the block ultimately only consists of a single byte - these are 0x00the terminator and 0x07the repetition end.

If a size is specified, the first 4 bytes are followed by a block of content, which results from the specified type, with the specified size.

VOC data block
Type (hex) Type description Size
(3-byte integer )
info
engl. eng.
0x00 Terminator delimiter - -
0x01 Sound data Audio data 2 + size of the data
Audio content
Offset description meaning
0x00 sampling rate 256- (1000000 / sample rate )
0x01 Codec see table
is ignored if a block of the type 0x08( Extra info ) defines a codec beforehand (from version 1.20, new 16-bit format )
from 0x02 Audio data in the specified format (codec)
0x02 Sound continue further audio data Size of the data further audio data in the same format as the previous block
0x03 Silence silence 3
silence
Offset description meaning
0x00-01 Length of silence in units of the sampling rate Integer-1
0x02 sampling rate as with audio content
0x04 marker 2 Marker number (2 bytes)
The last marker remains in a buffer during playback and can be jumped to again.
0x05 ASCII string ASCII character string Length of the string Zero-terminated string
0x06 Repeat To repeat 2 Number of repetitions (2-byte integer)
0x0000up 0xFFFEto 1–65,535 repetitions, 0xFFFFfor infinite
0x07 End repeat End of repetition -

The file optionally ends with the terminator block (data block of the type 0x00).

16-bit format extension

To expand the existing format to 16-bit, a new type byte was introduced for the data block: 0x09. The version in the header must be 1.20 (hexadecimal 0x0114) or newer.

Extended VOC data block
Type (hex) Type description Size
(3-byte integer )
info
engl. eng.
0x08 Extra info Additional information 4th
Audio content
Offset description meaning
0x00-01 Frequency divisor 256000000/(nb_channels * (65536 - frequency_divisor))
0x02 Codec Replaces codec information in all audio data (blocks) following this block
0x03 channels nb_channels= Number -1, example: 2 channels →0x01
0x09 Sound data (new format) Audio data in the new format 12 + Size of the data
Audio content
Offset description meaning
0x00-03 sampling rate
0x04 Bits per sample
0x05 channels
0x06-07 Codec see table
0x08-11 reserved
from 0x12 Audio data in the specified format (codec)

Codecs

Audio content
Codec ID
( hex )
Coding, compression, codec Block type
0x00 8 bits unsigned PCM Original ( 0x01, 0x02) and new ( 0x09)
0x01 4-8 bits of Creative ADPCM
0x02 3–8 bits Creative ADPCM (2.6 bits)
0x03 2-8 bits of Creative ADPCM
0x04 16 bits signed PCM from version 1.20; Original ( 0x01, 0x02) and new ( 0x09)
0x06 A-law
0x07 μ-law
0x0200 4-16 bits of Creative ADPCM only new extended format (from version 1.20; 0x09and 0x02)

use

Creative Voice files were used in various DOS games if they could use Sound Blaster cards for audio output, for example Eye of the Beholder .

The spread of the file format disappeared with the advent of RIFF WAVE , which was already supported by Microsoft's operating system in Windows . For the Creative Voice file format, however, additional playback programs had to be installed which were supplied with the drivers for the Sound Blaster cards. With the advent of AC'97 , WAVE, file extension , finally caught on. .WAV

Individual evidence

  1. ^ Greg: Greg figures out most of the .VOC format. In: Programming Textfiles: Format Specifications. Retrieved June 1, 2018 .
  2. John: John chimes in with further analysis of the .VOC format. In: Programming Textfiles: Format Specifications. Retrieved June 1, 2018 .
  3. Chris Bagwell: Audio File Formats FAQ. Chris Bagwell, November 14, 1998 S. Chapter 11: File Formats , accessed on June 1, 2018 (English, documentation ( FAQ ) of SoX - Audio Editor ).
  4. lol.voc. ( Wiki ) In: Eye of the Beholder Wiki. Retrieved June 1, 2018 .
  5. movAX13h / DrRiptideDissected. ( GitHub ) In: Dr. Riptide Dissected. Retrieved June 1, 2018 .