(Page 1 of 1 in this chapter)


Appendix D

VOX File Format


Introduction

This appendix presents the VOX file format.

Note: Refer to the Microsoft Windows MultiMedia Programmer's Reference Manual for information about the WAVE file format.

A voice file is partitioned into segments. Each message consists of one or more segments in the file. A message can consist of one or more segments if it has been edited, or if, when the message was created, there were some existing re-usable segments.

Each segment of the file is described by an entry in the file header. These segment descriptors are divided into three groups, in order.

Segment Descriptor

Description

Active

Describes the messages currently in existence. The active descriptors are ordered by message number. When there are multiple segments for one message, the descriptors' order corresponds to the order of the segments in the message.

Freed

Describes sections of the file that are available for re-use.

Unused

These descriptors do not contain anything.

The used descriptors are ordered by their segments' position in the file.

VOX File Format

A VOX file consists of a header, indices, and data.

Figure 9. VOX File Format


The voxinfo utility displays information about a VOX file. Refer to Section 9.3.3, VOX File Information: voxinfo for more information.

The following table illustrates the VOX file format. A 32 byte fixed sized header section is followed by an array of 10 byte segment descriptors, called indices.

Segment sizes are in units of frames. The number of bytes in a frame depends on the encoding. The table lists the frame sizes for supported encodings.

This table presents the VOX file format:

Encoding

VTYPE

2 bytes






Header
(32 bytes)







Total number of indices

TOTLIDX

2

Number of indices in use

USEDIDX

2

Number of indices in messages

ACTVIDX

2

Number of indices in free pool

FREEIDX

2

Highest message number in use

HIGHMSG

2

Total number of bytes

TOTLBYTE

4

Total number of frames

TOTLFRM

4

Reserved

12

Active Indices

10 x ACTVIDX bytes



Indices [10 x

TOTLIDX bytes]



(see Index Structure)


Freed Indices

10 x (USEDIDX - ACTVIDX) bytes

Unused Indices

10 x FREEIDX bytes

Actual voice frames in segments of various length where each segment is described by an index in either the Active Index list or the Freed Index list.

Frames
[TOTLFRM x
framesize]
(see Summary of Frame Sizes)

Index Structure

This table presents the index structure:

Message Number

MSGNO

2 bytes


Index Structure

[10 bytes]

Starting byte in file

STRTBYTE

4

Number of frames in segment

NFRAMES

4

Summary of Frame Sizes

This table presents frame sizes of common encodings:

Encoding

Description

msec/frame

bytes/frame

1

NMS ADPCM 16 kbs

20

42

2

NMS ADPCM 24 kbs

20

62

3

NMS ADPCM 32 kbs

20

82

4

framed PCM 64 kbs

20

162

10

mu-law 64 kbs

10

80

11

A-law 64 kbs

10

80

13

PCM 8 k mono 16 bit

10

160

14

OKI ADPCM 24 kbs

10

30

15

OKI ADPCM 32 kbs

10

40

16

PCM 11 khz 8-bit

10

110

17

PCM 11 khz 16-bit

10

220

20

G.726 ADPCM 32 kbs

10

40

22

IMA ADPCM 24 kbits/s

10

34

23

IMA ADPCM 32 kbits/s

10

46



(Page 1 of 1 in this chapter)


tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.