getID3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g //
More...
◆ Analyze()
Definition at line 21 of file module.audio.au.php.
References $info, AUdataFormatBitsPerSampleLookup(), AUdataFormatNameLookup(), AUdataFormatUsedBitsPerSampleLookup(), getid3_lib\BigEndian2Int(), getid3_handler\error(), getid3_handler\fread(), getid3_handler\fseek(), getid3_lib\PrintHexBytes(), and getid3_handler\warning().
22 $info = &$this->getid3->info;
25 $AUheader = $this->
fread(8);
28 if (substr($AUheader, 0, 4) != $magic) {
34 $info[
'au'] = array();
35 $thisfile_au = &
$info[
'au'];
37 $info[
'fileformat'] =
'au';
38 $info[
'audio'][
'dataformat'] =
'au';
39 $info[
'audio'][
'bitrate_mode'] =
'cbr';
40 $thisfile_au[
'encoding'] =
'ISO-8859-1';
43 $AUheader .= $this->
fread($thisfile_au[
'header_length'] - 8);
44 $info[
'avdataoffset'] += $thisfile_au[
'header_length'];
50 $thisfile_au[
'comments'][
'comment'][] = trim(substr($AUheader, 24));
55 $info[
'audio'][
'bits_per_sample'] = $thisfile_au[
'bits_per_sample'];
57 unset($thisfile_au[
'bits_per_sample']);
60 $info[
'audio'][
'sample_rate'] = $thisfile_au[
'sample_rate'];
61 $info[
'audio'][
'channels'] = $thisfile_au[
'channels'];
63 if ((
$info[
'avdataoffset'] + $thisfile_au[
'data_size']) >
$info[
'avdataend']) {
64 $this->
warning(
'Possible truncated file - expecting "'.$thisfile_au[
'data_size'].
'" bytes of audio data, only found '.(
$info[
'avdataend'] -
$info[
'avdataoffset']).
' bytes"');
67 $info[
'playtime_seconds'] = $thisfile_au[
'data_size'] / ($thisfile_au[
'sample_rate'] * $thisfile_au[
'channels'] * ($thisfile_au[
'used_bits_per_sample'] / 8));
68 $info[
'audio'][
'bitrate'] = ($thisfile_au[
'data_size'] * 8) /
$info[
'playtime_seconds'];
AUdataFormatBitsPerSampleLookup($id)
AUdataFormatNameLookup($id)
static PrintHexBytes($string, $hex=true, $spaces=true, $htmlencoding='UTF-8')
AUdataFormatUsedBitsPerSampleLookup($id)
fseek($bytes, $whence=SEEK_SET)
static BigEndian2Int($byteword, $synchsafe=false, $signed=false)
◆ AUdataFormatBitsPerSampleLookup()
getid3_au::AUdataFormatBitsPerSampleLookup |
( |
|
$id | ) |
|
Definition at line 107 of file module.audio.au.php.
References $id.
Referenced by Analyze().
108 static $AUdataFormatBitsPerSampleLookup = array(
132 return (isset($AUdataFormatBitsPerSampleLookup[
$id]) ? $AUdataFormatBitsPerSampleLookup[$id] :
false);
if(!array_key_exists('StateId', $_REQUEST)) $id
◆ AUdataFormatNameLookup()
getid3_au::AUdataFormatNameLookup |
( |
|
$id | ) |
|
Definition at line 73 of file module.audio.au.php.
References $id.
Referenced by Analyze().
74 static $AUdataFormatNameLookup = array(
75 0 =>
'unspecified format',
81 6 =>
'floating-point',
82 7 =>
'double-precision float',
83 8 =>
'fragmented sampled data',
84 9 =>
'SUN_FORMAT_NESTED',
86 11 =>
'8-bit fixed-point',
87 12 =>
'16-bit fixed-point',
88 13 =>
'24-bit fixed-point',
89 14 =>
'32-bit fixed-point',
91 16 =>
'non-audio display data',
92 17 =>
'SND_FORMAT_MULAW_SQUELCH',
93 18 =>
'16-bit linear with emphasis',
94 19 =>
'16-bit linear with compression',
95 20 =>
'16-bit linear with emphasis + compression',
96 21 =>
'Music Kit DSP commands',
97 22 =>
'SND_FORMAT_DSP_COMMANDS_SAMPLES',
98 23 =>
'CCITT g.721 4-bit ADPCM',
99 24 =>
'CCITT g.722 ADPCM',
100 25 =>
'CCITT g.723 3-bit ADPCM',
101 26 =>
'CCITT g.723 5-bit ADPCM',
104 return (isset($AUdataFormatNameLookup[
$id]) ? $AUdataFormatNameLookup[$id] :
false);
if(!array_key_exists('StateId', $_REQUEST)) $id
◆ AUdataFormatUsedBitsPerSampleLookup()
getid3_au::AUdataFormatUsedBitsPerSampleLookup |
( |
|
$id | ) |
|
Definition at line 135 of file module.audio.au.php.
References $id.
Referenced by Analyze().
136 static $AUdataFormatUsedBitsPerSampleLookup = array(
160 return (isset($AUdataFormatUsedBitsPerSampleLookup[
$id]) ? $AUdataFormatUsedBitsPerSampleLookup[$id] :
false);
if(!array_key_exists('StateId', $_REQUEST)) $id
The documentation for this class was generated from the following file: