Lines Matching refs:aiffinfo
45 AIFFINFO *aiffinfo, in aiffCreateHeader() argument
52 aiffinfo->comm.chunk[0] = 'C'; in aiffCreateHeader()
53 aiffinfo->comm.chunk[1] = 'O'; in aiffCreateHeader()
54 aiffinfo->comm.chunk[2] = 'M'; in aiffCreateHeader()
55 aiffinfo->comm.chunk[3] = 'M'; in aiffCreateHeader()
56 aiffinfo->comm.bytes[0] = 0; in aiffCreateHeader()
57 aiffinfo->comm.bytes[1] = 0; in aiffCreateHeader()
58 aiffinfo->comm.bytes[2] = 0; in aiffCreateHeader()
59 aiffinfo->comm.bytes[3] = 18; in aiffCreateHeader()
60 aiffinfo->comm.channels[0] = (u8)(0xFF & (channels >> 8)); in aiffCreateHeader()
61 aiffinfo->comm.channels[1] = (u8)(0xFF & channels); in aiffCreateHeader()
62 aiffinfo->comm.samples[0] = (u8)(0xFF & (samples >> 24)); in aiffCreateHeader()
63 aiffinfo->comm.samples[1] = (u8)(0xFF & (samples >> 16)); in aiffCreateHeader()
64 aiffinfo->comm.samples[2] = (u8)(0xFF & (samples >> 8)); in aiffCreateHeader()
65 aiffinfo->comm.samples[3] = (u8)(0xFF & samples); in aiffCreateHeader()
66 aiffinfo->comm.bitsPerSample[0] = (u8)(0xFF & (bitsPerSample >> 8)); in aiffCreateHeader()
67 aiffinfo->comm.bitsPerSample[1] = (u8)(0xFF & bitsPerSample); in aiffCreateHeader()
68 aiffinfo->comm.samplesPerSec[0] = 0x40; in aiffCreateHeader()
69 aiffinfo->comm.samplesPerSec[1] = 0x1E; in aiffCreateHeader()
70 aiffinfo->comm.samplesPerSec[2] = (u8)(0x7F & sampleRate >> 24); in aiffCreateHeader()
71 aiffinfo->comm.samplesPerSec[3] = (u8)(0xFF & sampleRate >> 16); in aiffCreateHeader()
72 aiffinfo->comm.samplesPerSec[4] = (u8)(0xFF & sampleRate >> 8); in aiffCreateHeader()
73 aiffinfo->comm.samplesPerSec[5] = (u8)(0xFF & sampleRate); in aiffCreateHeader()
74 aiffinfo->comm.samplesPerSec[6] = 0x00; in aiffCreateHeader()
75 aiffinfo->comm.samplesPerSec[7] = 0x00; in aiffCreateHeader()
76 aiffinfo->comm.samplesPerSec[8] = 0x00; in aiffCreateHeader()
77 aiffinfo->comm.samplesPerSec[9] = 0x00; in aiffCreateHeader()
84 AIFFINFO *aiffinfo, in aiffWriteHeader() argument
119 fwrite(&aiffinfo->comm, sizeof(AIFFCOMM), 1, outfile); in aiffWriteHeader()
156 void aiffCreateMark(AIFFINFO *aiffinfo, u32 startloop, u32 endloop) in aiffCreateMark() argument
158 aiffinfo->inst.chunk[0] = 'I'; in aiffCreateMark()
159 aiffinfo->inst.chunk[1] = 'N'; in aiffCreateMark()
160 aiffinfo->inst.chunk[2] = 'S'; in aiffCreateMark()
161 aiffinfo->inst.chunk[3] = 'T'; in aiffCreateMark()
162 aiffinfo->inst.bytes[0] = 0; in aiffCreateMark()
163 aiffinfo->inst.bytes[1] = 0; in aiffCreateMark()
164 aiffinfo->inst.bytes[2] = 0; in aiffCreateMark()
165 aiffinfo->inst.bytes[3] = 20; in aiffCreateMark()
166 aiffinfo->inst.normalKey = 64; in aiffCreateMark()
167 aiffinfo->inst.detune = 0; in aiffCreateMark()
168 aiffinfo->inst.lowKey = 0; in aiffCreateMark()
169 aiffinfo->inst.hiKey = 127; in aiffCreateMark()
170 aiffinfo->inst.loVel = 0; in aiffCreateMark()
171 aiffinfo->inst.hiVel = 127; in aiffCreateMark()
172 aiffinfo->inst.gain[0] = 0; in aiffCreateMark()
173 aiffinfo->inst.gain[1] = 0; in aiffCreateMark()
174 aiffinfo->inst.playMode0[0] = 0; in aiffCreateMark()
175 aiffinfo->inst.playMode0[1] = 1; in aiffCreateMark()
176 aiffinfo->inst.begLoop0[0] = 0; in aiffCreateMark()
177 aiffinfo->inst.begLoop0[1] = 0; in aiffCreateMark()
178 aiffinfo->inst.endLoop0[0] = 0; in aiffCreateMark()
179 aiffinfo->inst.endLoop0[1] = 1; in aiffCreateMark()
180 aiffinfo->inst.playMode1[0] = 0; in aiffCreateMark()
181 aiffinfo->inst.playMode1[1] = 1; in aiffCreateMark()
182 aiffinfo->inst.begLoop1[0] = 0; in aiffCreateMark()
183 aiffinfo->inst.begLoop1[1] = 0; in aiffCreateMark()
184 aiffinfo->inst.endLoop1[0] = 0; in aiffCreateMark()
185 aiffinfo->inst.endLoop1[1] = 0; in aiffCreateMark()
187 aiffinfo->mark.chunk[0] = 'M'; in aiffCreateMark()
188 aiffinfo->mark.chunk[1] = 'A'; in aiffCreateMark()
189 aiffinfo->mark.chunk[2] = 'R'; in aiffCreateMark()
190 aiffinfo->mark.chunk[3] = 'K'; in aiffCreateMark()
191 aiffinfo->mark.bytes[0] = 0; in aiffCreateMark()
192 aiffinfo->mark.bytes[1] = 0; in aiffCreateMark()
193 aiffinfo->mark.bytes[2] = 0; in aiffCreateMark()
194 aiffinfo->mark.bytes[3] = 35; in aiffCreateMark()
195 aiffinfo->mark.count[0] = 0; in aiffCreateMark()
196 aiffinfo->mark.count[1] = 2; in aiffCreateMark()
197 aiffinfo->mark.id0[0] = 0; in aiffCreateMark()
198 aiffinfo->mark.id0[1] = 0; in aiffCreateMark()
199 aiffinfo->mark.position0[0] = (u8)(0xFF & (startloop >> 24)); in aiffCreateMark()
200 aiffinfo->mark.position0[1] = (u8)(0xFF & (startloop >> 16)); in aiffCreateMark()
201 aiffinfo->mark.position0[2] = (u8)(0xFF & (startloop >> 8)); in aiffCreateMark()
202 aiffinfo->mark.position0[3] = (u8)(0xFF & startloop); in aiffCreateMark()
203 aiffinfo->mark.ch0[0] = 0x08; in aiffCreateMark()
204 aiffinfo->mark.ch0[1] = 'b'; in aiffCreateMark()
205 aiffinfo->mark.ch0[2] = 'e'; in aiffCreateMark()
206 aiffinfo->mark.ch0[3] = 'g'; in aiffCreateMark()
207 aiffinfo->mark.ch0[4] = ' '; in aiffCreateMark()
208 aiffinfo->mark.ch0[5] = 'l'; in aiffCreateMark()
209 aiffinfo->mark.ch0[6] = 'o'; in aiffCreateMark()
210 aiffinfo->mark.ch0[7] = 'o'; in aiffCreateMark()
211 aiffinfo->mark.ch0[8] = 'p'; in aiffCreateMark()
212 aiffinfo->mark.ch0[9] = 0; in aiffCreateMark()
213 aiffinfo->mark.id1[0] = 0; in aiffCreateMark()
214 aiffinfo->mark.id1[1] = 1; in aiffCreateMark()
215 aiffinfo->mark.position1[0] = (u8)(0xFF & (endloop >> 24)); in aiffCreateMark()
216 aiffinfo->mark.position1[1] = (u8)(0xFF & (endloop >> 16)); in aiffCreateMark()
217 aiffinfo->mark.position1[2] = (u8)(0xFF & (endloop >> 8)); in aiffCreateMark()
218 aiffinfo->mark.position1[3] = (u8)(0xFF & endloop); in aiffCreateMark()
219 aiffinfo->mark.ch1[0] = 0x30; in aiffCreateMark()
220 aiffinfo->mark.ch1[1] = 0x08; in aiffCreateMark()
221 aiffinfo->mark.ch1[2] = 'e'; in aiffCreateMark()
222 aiffinfo->mark.ch1[3] = 'n'; in aiffCreateMark()
223 aiffinfo->mark.ch1[4] = 'd'; in aiffCreateMark()
224 aiffinfo->mark.ch1[5] = ' '; in aiffCreateMark()
225 aiffinfo->mark.ch1[6] = 'l'; in aiffCreateMark()
226 aiffinfo->mark.ch1[7] = 'o'; in aiffCreateMark()
227 aiffinfo->mark.ch1[8] = 'o'; in aiffCreateMark()
228 aiffinfo->mark.ch1[9] = 'p'; in aiffCreateMark()
229 aiffinfo->mark.ch1[10] = 0; in aiffCreateMark()
234 void aiffWriteMark(AIFFINFO *aiffinfo, FILE *outfile) in aiffWriteMark() argument
236 fwrite(&aiffinfo->inst, sizeof(AIFFINST), 1, outfile); in aiffWriteMark()
237 fwrite(&aiffinfo->mark, sizeof(AIFFMARK), 1, outfile); in aiffWriteMark()
244 AIFFINFO *aiffinfo, in aiffReadHeader() argument
270 fread(&aiffinfo->comm.channels, 1, sizeof(u16), infile); in aiffReadHeader()
271 fread(&aiffinfo->comm.samples, 1, sizeof(u32), infile); in aiffReadHeader()
272 fread(&aiffinfo->comm.bitsPerSample, 1, sizeof(u16), infile); in aiffReadHeader()
273 fread(&aiffinfo->comm.samplesPerSec[0], 10, sizeof(u8), infile); in aiffReadHeader()
282 aiffinfo->mark.position0[0] = in aiffReadHeader()
283 aiffinfo->mark.position0[1] = in aiffReadHeader()
284 aiffinfo->mark.position0[2] = in aiffReadHeader()
285 aiffinfo->mark.position0[3] = in aiffReadHeader()
286 aiffinfo->mark.position1[0] = in aiffReadHeader()
287 aiffinfo->mark.position1[1] = in aiffReadHeader()
288 aiffinfo->mark.position1[2] = in aiffReadHeader()
289 aiffinfo->mark.position1[3] = 0; in aiffReadHeader()
343 aiffinfo->mark.position0[0] = (u8)(0xFF & (position >> 24)); in aiffReadHeader()
344 aiffinfo->mark.position0[1] = (u8)(0xFF & (position >> 16)); in aiffReadHeader()
345 aiffinfo->mark.position0[2] = (u8)(0xFF & (position >> 8)); in aiffReadHeader()
346 aiffinfo->mark.position0[3] = (u8)(0xFF & position); in aiffReadHeader()
352 aiffinfo->mark.position1[0] = (u8)(0xFF & (position >> 24)); in aiffReadHeader()
353 aiffinfo->mark.position1[1] = (u8)(0xFF & (position >> 16)); in aiffReadHeader()
354 aiffinfo->mark.position1[2] = (u8)(0xFF & (position >> 8)); in aiffReadHeader()
355 aiffinfo->mark.position1[3] = (u8)(0xFF & position); in aiffReadHeader()
385 aiffinfo->mark.position0[0] = 0; in aiffReadHeader()
386 aiffinfo->mark.position0[1] = 0; in aiffReadHeader()
387 aiffinfo->mark.position0[2] = 0; in aiffReadHeader()
388 aiffinfo->mark.position0[3] = 0; in aiffReadHeader()
389 aiffinfo->mark.position1[0] = 0; in aiffReadHeader()
390 aiffinfo->mark.position1[1] = 0; in aiffReadHeader()
391 aiffinfo->mark.position1[2] = 0; in aiffReadHeader()
392 aiffinfo->mark.position1[3] = 0; in aiffReadHeader()
416 int aiffGetChannels(AIFFINFO *aiffinfo) in aiffGetChannels() argument
418 return (aiffinfo->comm.channels[0] << 8) | aiffinfo->comm.channels[1]; in aiffGetChannels()
423 int aiffGetSampleRate(AIFFINFO *aiffinfo) in aiffGetSampleRate() argument
432 … ieeeExponent = (aiffinfo->comm.samplesPerSec[0] << 8) | aiffinfo->comm.samplesPerSec[1]; in aiffGetSampleRate()
434 ieeeMantissaHi = ( (aiffinfo->comm.samplesPerSec[2] << 24) | in aiffGetSampleRate()
435 (aiffinfo->comm.samplesPerSec[3] << 16) | in aiffGetSampleRate()
436 (aiffinfo->comm.samplesPerSec[4] << 8) | in aiffGetSampleRate()
437 aiffinfo->comm.samplesPerSec[5] ); in aiffGetSampleRate()
447 int aiffGetSamples(AIFFINFO *aiffinfo) in aiffGetSamples() argument
449 return (aiffinfo->comm.samples[0] << 24) | in aiffGetSamples()
450 (aiffinfo->comm.samples[1] << 16) | in aiffGetSamples()
451 (aiffinfo->comm.samples[2] << 8) | in aiffGetSamples()
452 aiffinfo->comm.samples[3]; in aiffGetSamples()
457 int aiffGetBitsPerSample(AIFFINFO *aiffinfo) in aiffGetBitsPerSample() argument
459 return (aiffinfo->comm.bitsPerSample[0] << 8) | in aiffGetBitsPerSample()
460 aiffinfo->comm.bitsPerSample[1]; in aiffGetBitsPerSample()
465 int aiffGetLoopStart(AIFFINFO *aiffinfo) in aiffGetLoopStart() argument
467 return (aiffinfo->mark.position0[0] << 24) | in aiffGetLoopStart()
468 (aiffinfo->mark.position0[1] << 16) | in aiffGetLoopStart()
469 (aiffinfo->mark.position0[2] << 8) | in aiffGetLoopStart()
470 aiffinfo->mark.position0[3]; in aiffGetLoopStart()
475 int aiffGetLoopEnd(AIFFINFO *aiffinfo) in aiffGetLoopEnd() argument
477 return ((aiffinfo->mark.position1[0] << 24) | in aiffGetLoopEnd()
478 (aiffinfo->mark.position1[1] << 16) | in aiffGetLoopEnd()
479 (aiffinfo->mark.position1[2] << 8) | in aiffGetLoopEnd()
480 aiffinfo->mark.position1[3]); in aiffGetLoopEnd()