GetId3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g //.
More...
GetId3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g //.
module for analyzing Digital Speech Standard (DSS) files
- Author
- James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g http://www.getid3.org
Definition at line 29 of file Dss.php.
◆ analyze()
GetId3\Module\Audio\Dss::analyze |
( |
| ) |
|
- Returns
- boolean
Definition at line 35 of file Dss.php.
References $info, array, GetId3\Handler\BaseHandler\fread(), GetId3\Handler\BaseHandler\fseek(), and GetId3\Lib\Helper\PrintHexBytes().
37 $info = &$this->getid3->info;
39 fseek($this->getid3->fp,
$info[
'avdataoffset'], SEEK_SET);
40 $DSSheader =
fread($this->getid3->fp, 1256);
42 if (!preg_match(
'#^(\x02|\x03)dss#', $DSSheader)) {
43 $info[
'error'][] =
'Expecting "[02-03] 64 73 73" at offset '.$info[
'avdataoffset'].
', found "'.
Helper::PrintHexBytes(substr($DSSheader, 0, 4)).
'"';
52 $thisfile_dss = &
$info[
'dss'];
54 $info[
'fileformat'] =
'dss';
55 $info[
'audio'][
'dataformat'] =
'dss';
56 $info[
'audio'][
'bitrate_mode'] =
'cbr';
59 $thisfile_dss[
'version'] = ord(substr($DSSheader, 0, 1));
60 $thisfile_dss[
'date_create'] = self::DSSdateStringToUnixDate(substr($DSSheader, 38, 12));
61 $thisfile_dss[
'date_complete'] = self::DSSdateStringToUnixDate(substr($DSSheader, 50, 12));
63 $thisfile_dss[
'length'] = intval((substr($DSSheader, 62, 2) * 3600) + (substr($DSSheader, 64, 2) * 60) + substr($DSSheader, 66, 2));
64 $thisfile_dss[
'priority'] = ord(substr($DSSheader, 793, 1));
65 $thisfile_dss[
'comments'] = trim(substr($DSSheader, 798, 100));
70 $info[
'audio'][
'channels'] = 1;
72 $info[
'playtime_seconds'] = $thisfile_dss[
'length'];
73 $info[
'audio'][
'bitrate'] = (
$info[
'filesize'] * 8) /
$info[
'playtime_seconds'];
static PrintHexBytes($string, $hex=true, $spaces=true, $htmlencoding='UTF-8')
fseek($bytes, $whence=SEEK_SET)
Create styles array
The data for the language used.
◆ DSSdateStringToUnixDate()
static GetId3\Module\Audio\Dss::DSSdateStringToUnixDate |
( |
|
$datestring | ) |
|
|
staticprotected |
- Parameters
-
- Returns
- type
Definition at line 83 of file Dss.php.
References $d, $h, and $y.
85 $y = substr($datestring, 0, 2);
86 $m = substr($datestring, 2, 2);
87 $d = substr($datestring, 4, 2);
88 $h = substr($datestring, 6, 2);
89 $i = substr($datestring, 8, 2);
90 $s = substr($datestring, 10, 2);
91 $y += ((
$y < 95) ? 2000 : 1900);
93 return mktime(
$h, $i, $s, $m,
$d,
$y);
for($col=0; $col< 50; $col++) $d
The documentation for this class was generated from the following file:
- libs/composer/vendor/phansys/getid3/GetId3/Module/Audio/Dss.php