{{short description|Audio format for digital audio data}} {{Infobox file format | name = VOC | icon = | extension = {{code|.voc}} | mime = audio / x-voc | developer = Creative Technology | type = | url = }}
'''Creative Voice''' , filename extension <code>.voc</code>, is an audio format for digital audio data developed in the 1990s Sound Blaster sound cards from Creative Technology.
== Construction ==
=== Original 8-bit format === The file format <ref>{{cite web|title=Greg figures out most of the .VOC Format|url=http://www.textfiles.com/programming/FORMATS/vocform.pro|accessdate=2018-06-01|last=Greg|language=en|archive-date=2015-10-28|archive-url=https://web.archive.org/web/20151028075631/http://www.textfiles.com/programming/FORMATS/vocform.pro|url-status=dead}}</ref><ref>{{cite web|title=John chimes in with further analysis of the .VOC Format|url=http://www.textfiles.com/programming/FORMATS/vocform2.pro|accessdate=2018-06-01|last=John|language=en|archive-date=2015-10-28|archive-url=https://web.archive.org/web/20151028075631/http://www.textfiles.com/programming/FORMATS/vocform2.pro|url-status=dead}}</ref><ref>{{cite web|title=Audio File Formats FAQ|first=Chris |last=Bagwell|url=https://sox.sourceforge.net/AudioFormats-11.html#ss11.5|accessdate=2018-06-01|date=1998-11-14|language=en|pages=Chapter 11: File Formats}} Documentation (FAQ) for the SoX audio editor</ref> consists of a 26-byte header and a series of subsequent data blocks containing the audio information. The byte order is little-endian. {| class="wikitable" |+VOC header !Offset (hex) !Length (in bytes) !Content |- | align="right" |<code>0x00</code> | align="right" |19 |ASCII string<code>Creative Voice File</code> |- | align="right" |<code>0x13</code> | align="right" |1 |<code>0x1A</code> (EOF) |- | align="right" |<code>0x14</code> | align="right" |2 |Starting byte of first data block (usually <code>0x1A00</code> for a little-endian value of 26) |- | align="right" |<code>0x16</code> | align="right" |2 |[Version] (major, minor), hexadecimal, e.g. <code>0x010a</code>, version 1.10 |- | align="right" |<code>0x18</code> | align="right" |2 |<code>Validation: ~version + 0x1234</code>, hexadecimal, truncated to 16 bits, e.g. <code>0x1129</code> |} The header is followed by data blocks. Each data block begins with a type byte describing the contents of the data, followed by 3 bytes for the size of the data. For two of the 9 defined types, the subsequent size of the data is missing, so the block ultimately consists of only a single byte – these are <code>0x00</code> terminator, and <code>0x07</code> repeat end.
If a size is specified, the first 4 bytes will be followed by a block of the content resulting from the specified type with the specified size. {| class="wikitable" |+VOC data block ! Type (hex) ! Type description ! Size (3 bytes) ! Info |- | align="right" |<code>0x00</code> | Terminator | align="right" |– |– |- | align="right" |<code>0x01</code> |{{lang|en|Sound data}} | align="right" |2 + size of the data | {| class="wikitable" |+Audio content !Offset !Description !Meaning |- | align="right" |<code>0x00</code> |Sampling rate |256-(1000000/sample rate) |- | align="right" |<code>0x01</code> |Codec |see table<!-- <code>0x00</code>: 8 Bit<br /><code>0x01</code>: 4 Bit<br /><code>0x02</code>: 2,6 Bit<br /><code>0x03</code>: 2 Bit<br />above <code>0x03</code>: Multi-DAC (3+number of channels)--> is ignored if a block of type <code>0x08</code> (extra info) defines a codec (from version 1.20) |- | align="right" |from <code>0x02</code> | colspan="2" |Audio data in the specified format (codec) |} |- | align="right" |<code>0x02</code> | Sound continue | align="right" |Size of the data |additional audio data in the same format as the previous block |- | align="right" |<code>0x03</code> | Silence | align="right" |3 | {| class="wikitable" |+Silence ! Offset ! Description ! Meaning |- | align="right" |<code>0x00-01</code> |Length of silence in the unit of the sampling rate |Integer <code>-1</code> |- | align="right" |<code>0x02</code> | sampling rate | ''as with audio content'' |- |} |- | align="right" |<code>0x04</code> | Marker | align="right" |2 | Marker number (2 bytes): remains in an intermediate memory during playback and can be jumped on again. |- | align="right" |<code>0x05</code> |ASCII string | align="right" |Length of the string | Null-terminated string |- | align="right" |<code>0x06</code> | Repeat | align="right" |2 | Number of repetitions (2-byte integer) <code>0x0000</code>to <code>0xFFFE</code>1-65,535 repetitions, <code>0xFFFF</code>for infinite |- | align="right" |<code>0x07</code> | End repeat | align="right" |– |– |- | align="right" |<code>0x08</code> | Extended | align="right" |4 |– |- |} The file optionally ends with the terminator block (data block of type <code>0x00</code>).
== Use== Creative Voice files were used in various DOS games when they could use sound blaster cards for audio output, such as ''In Search of Dr. Riptide''.<ref>movAX13h. [https://github.com/movAX13h/DrRiptideDissected "Dr. Riptide Dissected"] (README file). GitHub.</ref>
The spread of the file format disappeared noticeably with the advent of RIFF WAVE, which was already supported in Windows. However, the Creative Voice file format required the installation of additional player programs included with the Sound Blaster Card drivers. With the advent of AC'97, WAVE, file extension <code>.WAV</code>, finally prevailed.
==References== {{Reflist}}
Category:Audio file formats