-
Notifications
You must be signed in to change notification settings - Fork 11
/
formats.go
187 lines (178 loc) · 4.64 KB
/
formats.go
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
package audio
import "encoding/binary"
var (
// AIFF
// MONO
// FormatMono225008bBE mono 8bit 22.5kHz AIFF like format.
FormatMono225008bBE = &Format{
NumChannels: 1,
SampleRate: 22500,
BitDepth: 8,
Endianness: binary.BigEndian,
}
// FormatMono2250016bBE mono 16bit 22.5kHz AIFF like format.
FormatMono2250016bBE = &Format{
NumChannels: 1,
SampleRate: 22500,
BitDepth: 16,
Endianness: binary.BigEndian,
}
// FormatMono441008bBE mono 8bit 44.1kHz AIFF like format.
FormatMono441008bBE = &Format{
NumChannels: 1,
SampleRate: 44100,
BitDepth: 8,
Endianness: binary.BigEndian,
}
// FormatMono4410016bBE mono 16bit 44.1kHz AIFF like format.
FormatMono4410016bBE = &Format{
NumChannels: 1,
SampleRate: 44100,
BitDepth: 16,
Endianness: binary.BigEndian,
}
// FormatMono4410024bBE mono 24bit 44.1kHz AIFF like format.
FormatMono4410024bBE = &Format{
NumChannels: 1,
SampleRate: 44100,
BitDepth: 24,
Endianness: binary.BigEndian,
}
// FormatMono4410032bBE mono 32bit 44.1kHz AIFF like format.
FormatMono4410032bBE = &Format{
NumChannels: 1,
SampleRate: 44100,
BitDepth: 32,
Endianness: binary.BigEndian,
}
// STEREO
// FormatStereo225008bBE Stereo 8bit 22.5kHz AIFF like format.
FormatStereo225008bBE = &Format{
NumChannels: 2,
SampleRate: 22500,
BitDepth: 8,
Endianness: binary.BigEndian,
}
// FormatStereo2250016bBE Stereo 16bit 22.5kHz AIFF like format.
FormatStereo2250016bBE = &Format{
NumChannels: 2,
SampleRate: 22500,
BitDepth: 16,
Endianness: binary.BigEndian,
}
// FormatStereo441008bBE Stereo 8bit 44.1kHz AIFF like format.
FormatStereo441008bBE = &Format{
NumChannels: 2,
SampleRate: 44100,
BitDepth: 8,
Endianness: binary.BigEndian,
}
// FormatStereo4410016bBE Stereo 16bit 44.1kHz AIFF like format.
FormatStereo4410016bBE = &Format{
NumChannels: 2,
SampleRate: 44100,
BitDepth: 16,
Endianness: binary.BigEndian,
}
// FormatStereo4410024bBE Stereo 24bit 44.1kHz AIFF like format.
FormatStereo4410024bBE = &Format{
NumChannels: 2,
SampleRate: 44100,
BitDepth: 24,
Endianness: binary.BigEndian,
}
// FormatStereo4410032bBE Stereo 32bit 44.1kHz AIFF like format.
FormatStereo4410032bBE = &Format{
NumChannels: 2,
SampleRate: 44100,
BitDepth: 32,
Endianness: binary.BigEndian,
}
// WAV
// MONO
// FormatMono225008bLE mono 8bit 22.5kHz AIFF like format.
FormatMono225008bLE = &Format{
NumChannels: 1,
SampleRate: 22500,
BitDepth: 8,
Endianness: binary.LittleEndian,
}
// FormatMono2250016bLE mono 16bit 22.5kHz AIFF like format.
FormatMono2250016bLE = &Format{
NumChannels: 1,
SampleRate: 22500,
BitDepth: 16,
Endianness: binary.LittleEndian,
}
// FormatMono441008bLE mono 8bit 44.1kHz AIFF like format.
FormatMono441008bLE = &Format{
NumChannels: 1,
SampleRate: 44100,
BitDepth: 8,
Endianness: binary.LittleEndian,
}
// FormatMono4410016bLE mono 16bit 44.1kHz AIFF like format.
FormatMono4410016bLE = &Format{
NumChannels: 1,
SampleRate: 44100,
BitDepth: 16,
Endianness: binary.LittleEndian,
}
// FormatMono4410024bLE mono 24bit 44.1kHz AIFF like format.
FormatMono4410024bLE = &Format{
NumChannels: 1,
SampleRate: 44100,
BitDepth: 24,
Endianness: binary.LittleEndian,
}
// FormatMono4410032bLE mono 32bit 44.1kHz AIFF like format.
FormatMono4410032bLE = &Format{
NumChannels: 1,
SampleRate: 44100,
BitDepth: 32,
Endianness: binary.LittleEndian,
}
// STEREO
// FormatStereo225008bLE Stereo 8bit 22.5kHz AIFF like format.
FormatStereo225008bLE = &Format{
NumChannels: 2,
SampleRate: 22500,
BitDepth: 8,
Endianness: binary.LittleEndian,
}
// FormatStereo2250016bLE Stereo 16bit 22.5kHz AIFF like format.
FormatStereo2250016bLE = &Format{
NumChannels: 2,
SampleRate: 22500,
BitDepth: 16,
Endianness: binary.LittleEndian,
}
// FormatStereo441008bLE Stereo 8bit 44.1kHz AIFF like format.
FormatStereo441008bLE = &Format{
NumChannels: 2,
SampleRate: 44100,
BitDepth: 8,
Endianness: binary.LittleEndian,
}
// FormatStereo4410016bLE Stereo 16bit 44.1kHz AIFF like format.
FormatStereo4410016bLE = &Format{
NumChannels: 2,
SampleRate: 44100,
BitDepth: 16,
Endianness: binary.LittleEndian,
}
// FormatStereo4410024bLE Stereo 24bit 44.1kHz AIFF like format.
FormatStereo4410024bLE = &Format{
NumChannels: 2,
SampleRate: 44100,
BitDepth: 24,
Endianness: binary.LittleEndian,
}
// FormatStereo4410032bLE Stereo 32bit 44.1kHz AIFF like format.
FormatStereo4410032bLE = &Format{
NumChannels: 2,
SampleRate: 44100,
BitDepth: 32,
Endianness: binary.LittleEndian,
}
)