ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
Ac3.php
Go to the documentation of this file.
1<?php
2
3namespace GetId3\Module\Audio;
4
7
10// available at http://getid3.sourceforge.net //
11// or http://www.getid3.org //
13// See readme.txt for more details //
15// //
16// module.audio.ac3.php //
17// module for analyzing AC-3 (aka Dolby Digital) audio files //
18// dependencies: NONE //
19// ///
21
29class Ac3 extends BaseHandler
30{
35 private $AC3header = array();
36
41 private $BSIoffset = 0;
42
47 public function analyze()
48 {
49 $info = &$this->getid3->info;
50
52 $info['ac3']['raw']['bsi'] = array();
53 $thisfile_ac3 = &$info['ac3'];
54 $thisfile_ac3_raw = &$thisfile_ac3['raw'];
55 $thisfile_ac3_raw_bsi = &$thisfile_ac3_raw['bsi'];
56
57 // http://www.atsc.org/standards/a_52a.pdf
58
59 $info['fileformat'] = 'ac3';
60
61 // An AC-3 serial coded audio bit stream is made up of a sequence of synchronization frames
62 // Each synchronization frame contains 6 coded audio blocks (AB), each of which represent 256
63 // new audio samples per channel. A synchronization information (SI) header at the beginning
64 // of each frame contains information needed to acquire and maintain synchronization. A
65 // bit stream information (BSI) header follows SI, and contains parameters describing the coded
66 // audio service. The coded audio blocks may be followed by an auxiliary data (Aux) field. At the
67 // end of each frame is an error check field that includes a CRC word for error detection. An
68 // additional CRC word is located in the SI header, the use of which, by a decoder, is optional.
69 //
70 // syncinfo() | bsi() | AB0 | AB1 | AB2 | AB3 | AB4 | AB5 | Aux | CRC
71
72 // syncinfo() {
73 // syncword 16
74 // crc1 16
75 // fscod 2
76 // frmsizecod 6
77 // } /* end of syncinfo */
78
79 $this->fseek($info['avdataoffset']);
80 $this->AC3header['syncinfo'] = $this->fread(5);
81
82 $magic = "\x0B\x77";
83
84 if (strpos($this->AC3header['syncinfo'], $magic) === 0) {
85 $thisfile_ac3_raw['synchinfo']['synchword'] = $magic;
86 $offset = 2;
87 } else {
88 if (!$this->isDependencyFor('matroska')) {
89 unset($info['fileformat'], $info['ac3']);
90
91 return $this->error('Expecting "'.Helper::PrintHexBytes($magic).'" at offset '.$info['avdataoffset'].', found "'.Helper::PrintHexBytes(substr($this->AC3header['syncinfo'], 0, 2)).'"');
92 }
93 $offset = 0;
94 $this->fseek(-2, SEEK_CUR);
95 }
96
97 $info['audio']['dataformat'] = 'ac3';
98 $info['audio']['bitrate_mode'] = 'cbr';
99 $info['audio']['lossless'] = false;
100
101 $thisfile_ac3_raw['synchinfo']['crc1'] = Helper::LittleEndian2Int(substr($this->AC3header['syncinfo'], $offset, 2));
102 $ac3_synchinfo_fscod_frmsizecod = Helper::LittleEndian2Int(substr($this->AC3header['syncinfo'], ($offset + 2), 1));
103 $thisfile_ac3_raw['synchinfo']['fscod'] = ($ac3_synchinfo_fscod_frmsizecod & 0xC0) >> 6;
104 $thisfile_ac3_raw['synchinfo']['frmsizecod'] = ($ac3_synchinfo_fscod_frmsizecod & 0x3F);
105
106 $thisfile_ac3['sample_rate'] = self::sampleRateCodeLookup($thisfile_ac3_raw['synchinfo']['fscod']);
107 if ($thisfile_ac3_raw['synchinfo']['fscod'] <= 3) {
108 $info['audio']['sample_rate'] = $thisfile_ac3['sample_rate'];
109 }
110
111 $thisfile_ac3['frame_length'] = self::frameSizeLookup($thisfile_ac3_raw['synchinfo']['frmsizecod'], $thisfile_ac3_raw['synchinfo']['fscod']);
112 $thisfile_ac3['bitrate'] = self::bitrateLookup($thisfile_ac3_raw['synchinfo']['frmsizecod']);
113 $info['audio']['bitrate'] = $thisfile_ac3['bitrate'];
114
115 $this->AC3header['bsi'] = Helper::BigEndian2Bin($this->fread(15));
116 $ac3_bsi_offset = 0;
117
118 $thisfile_ac3_raw_bsi['bsid'] = $this->readHeaderBSI(5);
119 if ($thisfile_ac3_raw_bsi['bsid'] > 8) {
120 // Decoders which can decode version 8 will thus be able to decode version numbers less than 8.
121 // If this standard is extended by the addition of additional elements or features, a value of bsid greater than 8 will be used.
122 // Decoders built to this version of the standard will not be able to decode versions with bsid greater than 8.
123 $this->error('Bit stream identification is version '.$thisfile_ac3_raw_bsi['bsid'].', but GetId3Core() only understands up to version 8');
124 unset($info['ac3']);
125
126 return false;
127 }
128
129 $thisfile_ac3_raw_bsi['bsmod'] = $this->readHeaderBSI(3);
130 $thisfile_ac3_raw_bsi['acmod'] = $this->readHeaderBSI(3);
131
132 $thisfile_ac3['service_type'] = self::serviceTypeLookup($thisfile_ac3_raw_bsi['bsmod'], $thisfile_ac3_raw_bsi['acmod']);
133 $ac3_coding_mode = self::audioCodingModeLookup($thisfile_ac3_raw_bsi['acmod']);
134 foreach ($ac3_coding_mode as $key => $value) {
135 $thisfile_ac3[$key] = $value;
136 }
137 switch ($thisfile_ac3_raw_bsi['acmod']) {
138 case 0:
139 case 1:
140 $info['audio']['channelmode'] = 'mono';
141 break;
142 case 3:
143 case 4:
144 $info['audio']['channelmode'] = 'stereo';
145 break;
146 default:
147 $info['audio']['channelmode'] = 'surround';
148 break;
149 }
150 $info['audio']['channels'] = $thisfile_ac3['num_channels'];
151
152 if ($thisfile_ac3_raw_bsi['acmod'] & 0x01) {
153 // If the lsb of acmod is a 1, center channel is in use and cmixlev follows in the bit stream.
154 $thisfile_ac3_raw_bsi['cmixlev'] = $this->readHeaderBSI(2);
155 $thisfile_ac3['center_mix_level'] = self::centerMixLevelLookup($thisfile_ac3_raw_bsi['cmixlev']);
156 }
157
158 if ($thisfile_ac3_raw_bsi['acmod'] & 0x04) {
159 // If the msb of acmod is a 1, surround channels are in use and surmixlev follows in the bit stream.
160 $thisfile_ac3_raw_bsi['surmixlev'] = $this->readHeaderBSI(2);
161 $thisfile_ac3['surround_mix_level'] = self::surroundMixLevelLookup($thisfile_ac3_raw_bsi['surmixlev']);
162 }
163
164 if ($thisfile_ac3_raw_bsi['acmod'] == 0x02) {
165 // When operating in the two channel mode, this 2-bit code indicates whether or not the program has been encoded in Dolby Surround.
166 $thisfile_ac3_raw_bsi['dsurmod'] = $this->readHeaderBSI(2);
167 $thisfile_ac3['dolby_surround_mode'] = self::dolbySurroundModeLookup($thisfile_ac3_raw_bsi['dsurmod']);
168 }
169
170 $thisfile_ac3_raw_bsi['lfeon'] = (bool) $this->readHeaderBSI(1);
171 $thisfile_ac3['lfe_enabled'] = $thisfile_ac3_raw_bsi['lfeon'];
172 if ($thisfile_ac3_raw_bsi['lfeon']) {
173 //$info['audio']['channels']++;
174 $info['audio']['channels'] .= '.1';
175 }
176
177 $thisfile_ac3['channels_enabled'] = self::channelsEnabledLookup($thisfile_ac3_raw_bsi['acmod'], $thisfile_ac3_raw_bsi['lfeon']);
178
179 // This indicates how far the average dialogue level is below digital 100 percent. Valid values are 1–31.
180 // The value of 0 is reserved. The values of 1 to 31 are interpreted as -1 dB to -31 dB with respect to digital 100 percent.
181 $thisfile_ac3_raw_bsi['dialnorm'] = $this->readHeaderBSI(5);
182 $thisfile_ac3['dialogue_normalization'] = '-'.$thisfile_ac3_raw_bsi['dialnorm'].'dB';
183
184 $thisfile_ac3_raw_bsi['compre_flag'] = (bool) $this->readHeaderBSI(1);
185 if ($thisfile_ac3_raw_bsi['compre_flag']) {
186 $thisfile_ac3_raw_bsi['compr'] = $this->readHeaderBSI(8);
187 $thisfile_ac3['heavy_compression'] = self::heavyCompression($thisfile_ac3_raw_bsi['compr']);
188 }
189
190 $thisfile_ac3_raw_bsi['langcode_flag'] = (bool) $this->readHeaderBSI(1);
191 if ($thisfile_ac3_raw_bsi['langcode_flag']) {
192 $thisfile_ac3_raw_bsi['langcod'] = $this->readHeaderBSI(8);
193 }
194
195 $thisfile_ac3_raw_bsi['audprodie'] = (bool) $this->readHeaderBSI(1);
196 if ($thisfile_ac3_raw_bsi['audprodie']) {
197 $thisfile_ac3_raw_bsi['mixlevel'] = $this->readHeaderBSI(5);
198 $thisfile_ac3_raw_bsi['roomtyp'] = $this->readHeaderBSI(2);
199
200 $thisfile_ac3['mixing_level'] = (80 + $thisfile_ac3_raw_bsi['mixlevel']).'dB';
201 $thisfile_ac3['room_type'] = self::roomTypeLookup($thisfile_ac3_raw_bsi['roomtyp']);
202 }
203
204 if ($thisfile_ac3_raw_bsi['acmod'] == 0x00) {
205 // If acmod is 0, then two completely independent program channels (dual mono)
206 // are encoded into the bit stream, and are referenced as Ch1, Ch2. In this case,
207 // a number of additional items are present in BSI or audblk to fully describe Ch2.
208
209 // This indicates how far the average dialogue level is below digital 100 percent. Valid values are 1–31.
210 // The value of 0 is reserved. The values of 1 to 31 are interpreted as -1 dB to -31 dB with respect to digital 100 percent.
211 $thisfile_ac3_raw_bsi['dialnorm2'] = $this->readHeaderBSI(5);
212 $thisfile_ac3['dialogue_normalization2'] = '-'.$thisfile_ac3_raw_bsi['dialnorm2'].'dB';
213
214 $thisfile_ac3_raw_bsi['compre_flag2'] = (bool) $this->readHeaderBSI(1);
215 if ($thisfile_ac3_raw_bsi['compre_flag2']) {
216 $thisfile_ac3_raw_bsi['compr2'] = $this->readHeaderBSI(8);
217 $thisfile_ac3['heavy_compression2'] = self::heavyCompression($thisfile_ac3_raw_bsi['compr2']);
218 }
219
220 $thisfile_ac3_raw_bsi['langcode_flag2'] = (bool) $this->readHeaderBSI(1);
221 if ($thisfile_ac3_raw_bsi['langcode_flag2']) {
222 $thisfile_ac3_raw_bsi['langcod2'] = $this->readHeaderBSI(8);
223 }
224
225 $thisfile_ac3_raw_bsi['audprodie2'] = (bool) $this->readHeaderBSI(1);
226 if ($thisfile_ac3_raw_bsi['audprodie2']) {
227 $thisfile_ac3_raw_bsi['mixlevel2'] = $this->readHeaderBSI(5);
228 $thisfile_ac3_raw_bsi['roomtyp2'] = $this->readHeaderBSI(2);
229
230 $thisfile_ac3['mixing_level2'] = (80 + $thisfile_ac3_raw_bsi['mixlevel2']).'dB';
231 $thisfile_ac3['room_type2'] = self::roomTypeLookup($thisfile_ac3_raw_bsi['roomtyp2']);
232 }
233
234 }
235
236 $thisfile_ac3_raw_bsi['copyright'] = (bool) $this->readHeaderBSI(1);
237
238 $thisfile_ac3_raw_bsi['original'] = (bool) $this->readHeaderBSI(1);
239
240 $thisfile_ac3_raw_bsi['timecode1_flag'] = (bool) $this->readHeaderBSI(1);
241 if ($thisfile_ac3_raw_bsi['timecode1_flag']) {
242 $thisfile_ac3_raw_bsi['timecode1'] = $this->readHeaderBSI(14);
243 }
244
245 $thisfile_ac3_raw_bsi['timecode2_flag'] = (bool) $this->readHeaderBSI(1);
246 if ($thisfile_ac3_raw_bsi['timecode2_flag']) {
247 $thisfile_ac3_raw_bsi['timecode2'] = $this->readHeaderBSI(14);
248 }
249
250 $thisfile_ac3_raw_bsi['addbsi_flag'] = (bool) $this->readHeaderBSI(1);
251 if ($thisfile_ac3_raw_bsi['addbsi_flag']) {
252 $thisfile_ac3_raw_bsi['addbsi_length'] = $this->readHeaderBSI(6);
253
254 $this->AC3header['bsi'] .= Helper::BigEndian2Bin($this->fread($thisfile_ac3_raw_bsi['addbsi_length']));
255
256 $thisfile_ac3_raw_bsi['addbsi_data'] = substr($this->AC3header['bsi'], $this->BSIoffset, $thisfile_ac3_raw_bsi['addbsi_length'] * 8);
257 $this->BSIoffset += $thisfile_ac3_raw_bsi['addbsi_length'] * 8;
258 }
259
260 return true;
261 }
262
268 private function readHeaderBSI($length)
269 {
270 $data = substr($this->AC3header['bsi'], $this->BSIoffset, $length);
271 $this->BSIoffset += $length;
272
273 return bindec($data);
274 }
275
282 public static function sampleRateCodeLookup($fscod)
283 {
284 static $AC3sampleRateCodeLookup = array(
285 0 => 48000,
286 1 => 44100,
287 2 => 32000,
288 3 => 'reserved' // If the reserved code is indicated, the decoder should not attempt to decode audio and should mute.
289 );
290
291 return (isset($AC3sampleRateCodeLookup[$fscod]) ? $AC3sampleRateCodeLookup[$fscod] : false);
292 }
293
301 public static function serviceTypeLookup($bsmod, $acmod)
302 {
303 static $AC3serviceTypeLookup = array();
304 if (empty($AC3serviceTypeLookup)) {
305 for ($i = 0; $i <= 7; $i++) {
306 $AC3serviceTypeLookup[0][$i] = 'main audio service: complete main (CM)';
307 $AC3serviceTypeLookup[1][$i] = 'main audio service: music and effects (ME)';
308 $AC3serviceTypeLookup[2][$i] = 'associated service: visually impaired (VI)';
309 $AC3serviceTypeLookup[3][$i] = 'associated service: hearing impaired (HI)';
310 $AC3serviceTypeLookup[4][$i] = 'associated service: dialogue (D)';
311 $AC3serviceTypeLookup[5][$i] = 'associated service: commentary (C)';
312 $AC3serviceTypeLookup[6][$i] = 'associated service: emergency (E)';
313 }
314
315 $AC3serviceTypeLookup[7][1] = 'associated service: voice over (VO)';
316 for ($i = 2; $i <= 7; $i++) {
317 $AC3serviceTypeLookup[7][$i] = 'main audio service: karaoke';
318 }
319 }
320
321 return (isset($AC3serviceTypeLookup[$bsmod][$acmod]) ? $AC3serviceTypeLookup[$bsmod][$acmod] : false);
322 }
323
330 public static function audioCodingModeLookup($acmod)
331 {
332 static $AC3audioCodingModeLookup = array();
333 if (empty($AC3audioCodingModeLookup)) {
334 // array(channel configuration, # channels (not incl LFE), channel order)
335 $AC3audioCodingModeLookup = array (
336 0 => array('channel_config'=>'1+1', 'num_channels'=>2, 'channel_order'=>'Ch1,Ch2'),
337 1 => array('channel_config'=>'1/0', 'num_channels'=>1, 'channel_order'=>'C'),
338 2 => array('channel_config'=>'2/0', 'num_channels'=>2, 'channel_order'=>'L,R'),
339 3 => array('channel_config'=>'3/0', 'num_channels'=>3, 'channel_order'=>'L,C,R'),
340 4 => array('channel_config'=>'2/1', 'num_channels'=>3, 'channel_order'=>'L,R,S'),
341 5 => array('channel_config'=>'3/1', 'num_channels'=>4, 'channel_order'=>'L,C,R,S'),
342 6 => array('channel_config'=>'2/2', 'num_channels'=>4, 'channel_order'=>'L,R,SL,SR'),
343 7 => array('channel_config'=>'3/2', 'num_channels'=>5, 'channel_order'=>'L,C,R,SL,SR')
344 );
345 }
346
347 return (isset($AC3audioCodingModeLookup[$acmod]) ? $AC3audioCodingModeLookup[$acmod] : false);
348 }
349
356 public static function centerMixLevelLookup($cmixlev)
357 {
358 static $AC3centerMixLevelLookup;
359 if (empty($AC3centerMixLevelLookup)) {
360 $AC3centerMixLevelLookup = array(
361 0 => pow(2, -3.0 / 6), // 0.707 (–3.0 dB)
362 1 => pow(2, -4.5 / 6), // 0.595 (–4.5 dB)
363 2 => pow(2, -6.0 / 6), // 0.500 (–6.0 dB)
364 3 => 'reserved'
365 );
366 }
367
368 return (isset($AC3centerMixLevelLookup[$cmixlev]) ? $AC3centerMixLevelLookup[$cmixlev] : false);
369 }
370
377 public static function surroundMixLevelLookup($surmixlev)
378 {
379 static $AC3surroundMixLevelLookup;
380 if (empty($AC3surroundMixLevelLookup)) {
381 $AC3surroundMixLevelLookup = array(
382 0 => pow(2, -3.0 / 6),
383 1 => pow(2, -6.0 / 6),
384 2 => 0,
385 3 => 'reserved'
386 );
387 }
388
389 return (isset($AC3surroundMixLevelLookup[$surmixlev]) ? $AC3surroundMixLevelLookup[$surmixlev] : false);
390 }
391
398 public static function dolbySurroundModeLookup($dsurmod)
399 {
400 static $AC3dolbySurroundModeLookup = array(
401 0 => 'not indicated',
402 1 => 'Not Dolby Surround encoded',
403 2 => 'Dolby Surround encoded',
404 3 => 'reserved'
405 );
406
407 return (isset($AC3dolbySurroundModeLookup[$dsurmod]) ? $AC3dolbySurroundModeLookup[$dsurmod] : false);
408 }
409
416 public static function channelsEnabledLookup($acmod, $lfeon)
417 {
418 $AC3channelsEnabledLookup = array(
419 'ch1'=>(bool) ($acmod == 0),
420 'ch2'=>(bool) ($acmod == 0),
421 'left'=>(bool) ($acmod > 1),
422 'right'=>(bool) ($acmod > 1),
423 'center'=>(bool) ($acmod & 0x01),
424 'surround_mono'=>false,
425 'surround_left'=>false,
426 'surround_right'=>false,
427 'lfe'=>$lfeon);
428 switch ($acmod) {
429 case 4:
430 case 5:
431 $AC3channelsEnabledLookup['surround_mono'] = true;
432 break;
433 case 6:
434 case 7:
435 $AC3channelsEnabledLookup['surround_left'] = true;
436 $AC3channelsEnabledLookup['surround_right'] = true;
437 break;
438 }
439
440 return $AC3channelsEnabledLookup;
441 }
442
448 public static function heavyCompression($compre)
449 {
450 // The first four bits indicate gain changes in 6.02dB increments which can be
451 // implemented with an arithmetic shift operation. The following four bits
452 // indicate linear gain changes, and require a 5-bit multiply.
453 // We will represent the two 4-bit fields of compr as follows:
454 // X0 X1 X2 X3 . Y4 Y5 Y6 Y7
455 // The meaning of the X values is most simply described by considering X to represent a 4-bit
456 // signed integer with values from –8 to +7. The gain indicated by X is then (X + 1) * 6.02 dB. The
457 // following table shows this in detail.
458
459 // Meaning of 4 msb of compr
460 // 7 +48.16 dB
461 // 6 +42.14 dB
462 // 5 +36.12 dB
463 // 4 +30.10 dB
464 // 3 +24.08 dB
465 // 2 +18.06 dB
466 // 1 +12.04 dB
467 // 0 +6.02 dB
468 // -1 0 dB
469 // -2 –6.02 dB
470 // -3 –12.04 dB
471 // -4 –18.06 dB
472 // -5 –24.08 dB
473 // -6 –30.10 dB
474 // -7 –36.12 dB
475 // -8 –42.14 dB
476
477 $fourbit = str_pad(decbin(($compre & 0xF0) >> 4), 4, '0', STR_PAD_LEFT);
478 if ($fourbit{0} == '1') {
479 $log_gain = -8 + bindec(substr($fourbit, 1));
480 } else {
481 $log_gain = bindec(substr($fourbit, 1));
482 }
483 $log_gain = ($log_gain + 1) * Helper::RGADamplitude2dB(2);
484
485 // The value of Y is a linear representation of a gain change of up to –6 dB. Y is considered to
486 // be an unsigned fractional integer, with a leading value of 1, or: 0.1 Y4 Y5 Y6 Y7 (base 2). Y can
487 // represent values between 0.111112 (or 31/32) and 0.100002 (or 1/2). Thus, Y can represent gain
488 // changes from –0.28 dB to –6.02 dB.
489
490 $lin_gain = (16 + ($compre & 0x0F)) / 32;
491
492 // The combination of X and Y values allows compr to indicate gain changes from
493 // 48.16 – 0.28 = +47.89 dB, to
494 // –42.14 – 6.02 = –48.16 dB.
495 return $log_gain - $lin_gain;
496 }
497
504 public static function roomTypeLookup($roomtyp)
505 {
506 static $AC3roomTypeLookup = array(
507 0 => 'not indicated',
508 1 => 'large room, X curve monitor',
509 2 => 'small room, flat monitor',
510 3 => 'reserved'
511 );
512
513 return (isset($AC3roomTypeLookup[$roomtyp]) ? $AC3roomTypeLookup[$roomtyp] : false);
514 }
515
523 public static function frameSizeLookup($frmsizecod, $fscod)
524 {
525 $padding = (bool) ($frmsizecod % 2);
526 $framesizeid = floor($frmsizecod / 2);
527
528 static $AC3frameSizeLookup = array();
529 if (empty($AC3frameSizeLookup)) {
530 $AC3frameSizeLookup = array (
531 0 => array(128, 138, 192),
532 1 => array(40, 160, 174, 240),
533 2 => array(48, 192, 208, 288),
534 3 => array(56, 224, 242, 336),
535 4 => array(64, 256, 278, 384),
536 5 => array(80, 320, 348, 480),
537 6 => array(96, 384, 416, 576),
538 7 => array(112, 448, 486, 672),
539 8 => array(128, 512, 556, 768),
540 9 => array(160, 640, 696, 960),
541 10 => array(192, 768, 834, 1152),
542 11 => array(224, 896, 974, 1344),
543 12 => array(256, 1024, 1114, 1536),
544 13 => array(320, 1280, 1392, 1920),
545 14 => array(384, 1536, 1670, 2304),
546 15 => array(448, 1792, 1950, 2688),
547 16 => array(512, 2048, 2228, 3072),
548 17 => array(576, 2304, 2506, 3456),
549 18 => array(640, 2560, 2786, 3840)
550 );
551 }
552 if (($fscod == 1) && $padding) {
553 // frame lengths are padded by 1 word (16 bits) at 44100
554 $AC3frameSizeLookup[$frmsizecod] += 2;
555 }
556
557 return (isset($AC3frameSizeLookup[$framesizeid][$fscod]) ? $AC3frameSizeLookup[$framesizeid][$fscod] : false);
558 }
559
566 public static function bitrateLookup($frmsizecod)
567 {
568 $framesizeid = floor($frmsizecod / 2);
569
570 static $AC3bitrateLookup = array(
571 0 => 32000,
572 1 => 40000,
573 2 => 48000,
574 3 => 56000,
575 4 => 64000,
576 5 => 80000,
577 6 => 96000,
578 7 => 112000,
579 8 => 128000,
580 9 => 160000,
581 10 => 192000,
582 11 => 224000,
583 12 => 256000,
584 13 => 320000,
585 14 => 384000,
586 15 => 448000,
587 16 => 512000,
588 17 => 576000,
589 18 => 640000
590 );
591
592 return (isset($AC3bitrateLookup[$framesizeid]) ? $AC3bitrateLookup[$framesizeid] : false);
593 }
594}
An exception for terminatinating execution or to throw for unit testing.
GetId3() by James Heinrich info@getid3.org //.
Definition: BaseHandler.php:26
fseek($bytes, $whence=SEEK_SET)
GetId3() by James Heinrich info@getid3.org //.
Definition: Helper.php:27
static RGADamplitude2dB($amplitude)
Definition: Helper.php:1610
static LittleEndian2Int($byteword, $signed=false)
Definition: Helper.php:413
static PrintHexBytes($string, $hex=true, $spaces=true, $htmlencoding='UTF-8')
Definition: Helper.php:36
static BigEndian2Bin($byteword)
Definition: Helper.php:423
GetId3() by James Heinrich info@getid3.org //.
Definition: Ac3.php:30
readHeaderBSI($length)
Definition: Ac3.php:268
static channelsEnabledLookup($acmod, $lfeon)
Definition: Ac3.php:416
static serviceTypeLookup($bsmod, $acmod)
@staticvar array $AC3serviceTypeLookup
Definition: Ac3.php:301
static heavyCompression($compre)
Definition: Ac3.php:448
static bitrateLookup($frmsizecod)
@staticvar array $AC3bitrateLookup
Definition: Ac3.php:566
static audioCodingModeLookup($acmod)
@staticvar array $AC3audioCodingModeLookup
Definition: Ac3.php:330
static dolbySurroundModeLookup($dsurmod)
@staticvar array $AC3dolbySurroundModeLookup
Definition: Ac3.php:398
static roomTypeLookup($roomtyp)
@staticvar array $AC3roomTypeLookup
Definition: Ac3.php:504
static sampleRateCodeLookup($fscod)
@staticvar array $AC3sampleRateCodeLookup
Definition: Ac3.php:282
static frameSizeLookup($frmsizecod, $fscod)
@staticvar array $AC3frameSizeLookup
Definition: Ac3.php:523
static centerMixLevelLookup($cmixlev)
@staticvar type $AC3centerMixLevelLookup
Definition: Ac3.php:356
static surroundMixLevelLookup($surmixlev)
@staticvar type $AC3surroundMixLevelLookup
Definition: Ac3.php:377
$info
Definition: example_052.php:80