Creative SB0350 Hardware Programming Guide - Page 128

Creative SB0350 Manual

Page 128 highlights

B-4 File Format Block Type 1 This is a digitized sound data block. The Block Header is organized as follows: BYTE BYTE BYTE BYTE bBlockID; nBlockLen[3]; bTimeConstant; bPackMethod; // == 1 // 3-byte block length // Packing Method The header is followed immediately by the digitized sound data. Here is a discussion of various fields: bBlockID The Block Type identifier is 1. nBlockLen Length of the block (in bytes), excluding the bBlockID and nBlockLen fields. The value here will be the digitized sound data length plus 2. bTimeConstant This is a 1-byte field which indicates the Time Constant of the digitized sound data of this block. The Time Constant is defined as follows: Time Constant = 65536 - (256 000 000/( channels * sampling rate)) The channels parameter is 1 for mono and 2 for stereo. Only the high byte of the result is stored here. For instance, for a 10000Hz mono digitized sound, the Time Constant is set to 9C hex using the following calculation: Time Constant = 65536 - (256 000 000 / 10 000) = 39936 (09C00H) bPackMethod This is an 1 byte field which indicates the packing method used by the digitized sound data of this block. It is defined as: Value 0 1 2 3 Meaning 8-bit PCM Creative 8-bit to 4-bit ADPCM Creative 8-bit to 3-bit ADPCM Creative 8-bit to 2-bit ADPCM

  • 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

B-4
File Format
Block Type 1
This is a digitized sound data block.
The Block Header is organized as follows:
BYTE
bBlockID;
// == 1
BYTE
nBlockLen[3];
// 3-byte block length
BYTE
bTimeConstant;
BYTE
bPackMethod;
// Packing Method
The header is followed immediately by the digitized sound data.
Here is a discussion of various fields:
bBlockID
The Block Type identifier is 1.
nBlockLen
Length of the block (in bytes), excluding the
bBlockID
and
nBlockLen
fields.
The value here will be the digitized sound data length plus 2.
bTimeConstant
This is a 1-byte field which indicates the
Time Constant
of the digitized
sound data of this block.
The Time Constant is defined as follows:
Time Constant = 65536 - (256 000 000/(
channels
*
sampling rate
))
The
channels
parameter is 1 for mono and 2 for stereo.
Only the high byte of the result is stored here.
For instance, for a
10000Hz mono digitized sound, the Time Constant is set to 9C hex using
the following calculation:
Time Constant
= 65536 - (256 000 000 / 10 000)
= 39936 (09C00H)
bPackMethod
This is an 1 byte field which indicates the packing method used by the
digitized sound data of this block.
It is defined as:
Value
Meaning
0
8-bit PCM
1
Creative 8-bit to 4-bit ADPCM
2
Creative 8-bit to 3-bit ADPCM
3
Creative 8-bit to 2-bit ADPCM