[alt.hackers] Sound Blaster .VOC File Format

me (03/07/91)

Not too big of a deal, but using voc-hdr along with debug, I mapped
out the file format for Sound Blaster .VOC files...
-----------------------------------------------------------------
 

HEADER: (bytes 00-19)
=======
     byte #           Description
     ------           -----------
     00-12            Creative Voice File
     13-15            1A 1A 00  (eof to abort printing of file)
     16-17            Version number             (VOC-HDR puts 0A 01)
     18-19            2's Comp of Ver. # + 1234h (VOC-HDR puts 29 11)
 
DATA: (bytes 1A+)    A series of data blocks terminated by 00
=====
 
   Data Block:  TYPE(1-byte), SIZE(3-bytes), INFO(0+ bytes)
   -----------
 
      TYPE   Description   Size (3-byte int)   info
      ----   -----------   -----------------   ----
      01     Sound data    2+length of data    *
      02     ????
      03     Silence       3                   *
      04     Marker        2                   marker #
      05     ????
      06     Repeat        2                   # of repetitions
      07     End repeat    0
      08+    ????
 
*Sound info format:         *Silence info format:
 -----------------           --------------------
 00   Sample rate            00-01  Length of silence (weird encryption)
 01   Compression type       02     38
 02+  Data
 
 
Sample rate       -- SR byte = 256-(1000000/sample_rate)
Length of silence -- (# of .1 seconds encrypted)
Compression type  -- 8-bits    = 0
                     4-bits    = 1
                     2.5-bits  = 2
                     2-bits    = 3
                     Multi DAC = 3+(# of channels)
 
Silence encoding in VOXKIT finds quiet places in file, and creates a separate
block that is of type Silence.
-------------------------------------------------------------------
Next step is disassembling the ct-voice.drv driver and finding out how
to send data to the card.


 

greiner@oahu.cs.ucla.edu (John Greiner) (04/22/91)

In article <1991Mar7.002906.4258@dsd.es.com> usenet@dsd.es.com writes:
>Not too big of a deal, but using voc-hdr along with debug, I mapped
>out the file format for Sound Blaster .VOC files...
>-----------------------------------------------------------------

I just got the developer's kit for the SoundBlaster so I can fill
in some holes in the CMF File Format.   - John

-----------------------------------------------------------------

Creative Voice File (VOC) Format:

    HEADER (bytes 00-19)
    Series of DATA BLOCKS (bytes 1A+) [Must end w/ Terminator Block]

-----------------------------------------------------------------

HEADER:
=======
     byte #     Description
     ------     ------------------------------------------
     00-12      Creative Voice File
     13-15      1A 1A 00  (eof to abort printing of file)
     16-17      Version number (minor,major) (VOC-HDR puts 0A 01)
     18-19      2's Comp of Ver. # + 1234h (VOC-HDR puts 29 11)

-----------------------------------------------------------------

DATA BLOCK:
===========

   Data Block:  TYPE(1-byte), SIZE(3-bytes), INFO(0+ bytes)
   NOTE: Terminator Block is an exception -- it has only the TYPE byte.

      TYPE   Description     Size (3-byte int)   Info
      ----   -----------     -----------------   -----------------------
      00     Terminator      (NONE)              (NONE)
      01     Sound data      2+length of data    *
      02     Sound continue  length of data      Voice Data
      03     Silence         3                   **
      04     Marker          2                   Marker# (2 bytes)
      05     ASCII           length of string    null terminated string
      06     Repeat          2                   Count# (2 bytes)
      07     End repeat      0                   (NONE)

      *Sound Info Format:       **Silence Info Format:
       ---------------------      ----------------------------
       00   Sample Rate           00-01  Length of silence - 1
       01   Compression Type      02     Sample Rate
       02+  Voice Data


  Marker#           -- Driver keeps the most recent marker in a status byte
  Count#            -- Number of repetitions + 1
                         Count# may be 1 to FFFE for 0 - FFFD repetitions
                         or FFFF for endless repetitions
  Sample Rate       -- SR byte = 256-(1000000/sample_rate)
  Length of silence -- in units of sampling cycle
  Compression Type  -- of voice data
                         8-bits    = 0
                         4-bits    = 1
                         2.6-bits  = 2
                         2-bits    = 3
                         Multi DAC = 3+(# of channels) [interesting--
                                       this isn't in the developer's manual]

-----------------------------------------------------------------
-John