Creative SB0350 Hardware Programming Guide - Page 127

Creative SB0350 Manual

Page 127 highlights

File Format B-3 Offset (Hex) 18H - 19H Description .VOC file identification code. This code allows your program to check that this file is a .VOC file. Its content is the complement of the file format version number, plus 1234 hex. For version of 1.20, it is complement(0114H) + 1234H = 111FH. Data Block The Data Block is sub-divided into multiple sub-blocks of data. The first byte of each sub-block is called the Block Type. It indicates the type of data contained in the sub-block. The next three bytes is the 24-bit (3-byte) Block Length. It is the number of bytes in the sub-block excluding the Block Type and Block Length fields. The first byte is a lowest byte and the third byte is the highest byte of the length field respectively. All sub-blocks have the Block Type field followed immediately by the block length field except the Terminator sub-block. Your program need not interpret all the Block Types. If unknown Block Type is encountered, it should ignored and advance to the next sub-block by using the Block Length. The high-level digitized sound drivers handle these data blocks automatically for you. Therefore, you should use these drivers to perform digitized sound I/O operations. Block Type 0 This is a 1-byte sub-block which terminates the entire Data Block. The Block Type identifier is 0. It indicates that there are no other sub-blocks after it. The high-level digitized sound drivers terminate digitized sound output when this Block Type is encountered. This Block Type should be the last block of the .VOC file.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141

File Format
B-3
Offset (Hex)
Description
18H - 19H
.VOC file identification code.
This code allows your
program to check that this file is a
.VOC file.
Its content is the complement of the file format version
number, plus 1234 hex.
For version of 1.20, it is
complement(0114H) + 1234H = 111FH.
Data Block
The Data Block is sub-divided into multiple sub-blocks of data.
The first byte of each sub-block is called the Block Type.
It indicates the type of data
contained in the sub-block.
The next three bytes is the 24-bit (3-byte) Block Length. It is the number of bytes in
the sub-block excluding the Block Type and Block Length fields.
The first byte is a
lowest byte and the third byte is the highest byte of the length field respectively.
All
sub-blocks have the Block Type field followed immediately by the block length field
except the Terminator sub-block.
Your program need not interpret all the Block Types.
If unknown Block Type is
encountered, it should ignored and advance to the next sub-block by using the Block
Length.
The high-level digitized sound drivers handle these data blocks automatically for
you.
Therefore, you should use these drivers to perform digitized sound I/O
operations.
Block Type 0
This is a 1-byte sub-block which terminates the entire Data Block.
The Block Type
identifier is 0.
It indicates that there are no other sub-blocks after it.
The high-level
digitized sound drivers terminate digitized sound output when this Block Type is
encountered.
This Block Type should be the last block of the .VOC file.