23 $info = &$this->getid3->info;
25 $info[
'fileformat'] =
'dsf';
26 $info[
'audio'][
'dataformat'] =
'dsf';
27 $info[
'audio'][
'lossless'] =
true;
28 $info[
'audio'][
'bitrate_mode'] =
'cbr';
31 $dsfheader = $this->
fread(28 + 12);
34 $info[
'dsf'][
'dsd'][
'magic'] = substr($dsfheader, $headeroffset, 4);
37 if (
$info[
'dsf'][
'dsd'][
'magic'] != $magic) {
39 unset(
$info[
'fileformat']);
40 unset(
$info[
'audio']);
52 $info[
'dsf'][
'fmt'][
'magic'] = substr($dsfheader, $headeroffset, 4);
55 if (
$info[
'dsf'][
'fmt'][
'magic'] != $magic) {
61 $dsfheader .= $this->
fread(
$info[
'dsf'][
'fmt'][
'fmt_chunk_size'] - 12 + 12);
62 if (strlen($dsfheader) != (
$info[
'dsf'][
'dsd'][
'dsd_chunk_size'] +
$info[
'dsf'][
'fmt'][
'fmt_chunk_size'] + 12)) {
63 $this->
error(
'Expecting '.(
$info[
'dsf'][
'dsd'][
'dsd_chunk_size'] +
$info[
'dsf'][
'fmt'][
'fmt_chunk_size']).
' bytes header, found '.strlen($dsfheader).
' bytes');
86 $info[
'dsf'][
'data'][
'magic'] = substr($dsfheader, $headeroffset, 4);
89 if (
$info[
'dsf'][
'data'][
'magic'] != $magic) {
95 $info[
'avdataoffset'] = $headeroffset;
96 $info[
'avdataend'] =
$info[
'avdataoffset'] +
$info[
'dsf'][
'data'][
'data_chunk_size'];
99 if ($info[
'dsf'][
'dsd'][
'meta_chunk_offset'] > 0) {
101 $getid3_id3v2->StartingOffset = $info[
'dsf'][
'dsd'][
'meta_chunk_offset'];
102 $getid3_id3v2->Analyze();
103 unset($getid3_id3v2);
107 $info[
'dsf'][
'fmt'][
'channel_type'] = $this->
DSFchannelTypeLookup($info[
'dsf'][
'fmt'][
'channel_type_id']);
108 $info[
'audio'][
'channelmode'] = $info[
'dsf'][
'fmt'][
'channel_type'];
109 $info[
'audio'][
'bits_per_sample'] = $info[
'dsf'][
'fmt'][
'bits_per_sample'];
110 $info[
'audio'][
'sample_rate'] = $info[
'dsf'][
'fmt'][
'sample_rate'];
111 $info[
'audio'][
'channels'] = $info[
'dsf'][
'fmt'][
'channels'];
112 $info[
'audio'][
'bitrate'] = $info[
'audio'][
'bits_per_sample'] * $info[
'audio'][
'sample_rate'] * $info[
'audio'][
'channels'];
113 $info[
'playtime_seconds'] = ($info[
'dsf'][
'data'][
'data_chunk_size'] * 8) / $info[
'audio'][
'bitrate'];
120 static $DSFchannelTypeLookup =
array(
130 return (isset($DSFchannelTypeLookup[$channel_type_id]) ? $DSFchannelTypeLookup[$channel_type_id] :
'');
static LittleEndian2Int($byteword, $signed=false)
static IncludeDependency($filename, $sourcefile, $DieOnFailure=false)
static PrintHexBytes($string, $hex=true, $spaces=true, $htmlencoding='UTF-8')
Create styles array
The data for the language used.
fseek($bytes, $whence=SEEK_SET)
static DSFchannelTypeLookup($channel_type_id)