22 $info = &$this->getid3->info;
64 $info[
'fileformat'] =
'avr';
67 $AVRheader = $this->
fread(128);
69 $info[
'avr'][
'raw'][
'magic'] = substr($AVRheader, 0, 4);
71 if (
$info[
'avr'][
'raw'][
'magic'] != $magic) {
73 unset(
$info[
'fileformat']);
77 $info[
'avdataoffset'] += 128;
79 $info[
'avr'][
'sample_name'] = rtrim(substr($AVRheader, 4, 8));
93 $info[
'avr'][
'sample_name_extra'] = rtrim(substr($AVRheader, 44, 20));
94 $info[
'avr'][
'comment'] = rtrim(substr($AVRheader, 64, 64));
96 $info[
'avr'][
'flags'][
'stereo'] = ((
$info[
'avr'][
'raw'][
'mono'] == 0) ?
false :
true);
97 $info[
'avr'][
'flags'][
'signed'] = ((
$info[
'avr'][
'raw'][
'signed'] == 0) ?
false :
true);
98 $info[
'avr'][
'flags'][
'loop'] = ((
$info[
'avr'][
'raw'][
'loop'] == 0) ?
false :
true);
101 if ((
$info[
'avr'][
'raw'][
'midi'] & 0xFF00) != 0xFF00) {
102 $info[
'avr'][
'midi_notes'][] = (
$info[
'avr'][
'raw'][
'midi'] & 0xFF00) >> 8;
104 if ((
$info[
'avr'][
'raw'][
'midi'] & 0x00FF) != 0x00FF) {
105 $info[
'avr'][
'midi_notes'][] = (
$info[
'avr'][
'raw'][
'midi'] & 0x00FF);
108 if ((
$info[
'avdataend'] -
$info[
'avdataoffset']) != (
$info[
'avr'][
'sample_length'] * ((
$info[
'avr'][
'bits_per_sample'] == 8) ? 1 : 2))) {
109 $this->
warning(
'Probable truncated file: expecting '.(
$info[
'avr'][
'sample_length'] * ((
$info[
'avr'][
'bits_per_sample'] == 8) ? 1 : 2)).
' bytes of audio data, found '.(
$info[
'avdataend'] -
$info[
'avdataoffset']));
112 $info[
'audio'][
'dataformat'] =
'avr';
113 $info[
'audio'][
'lossless'] =
true;
114 $info[
'audio'][
'bitrate_mode'] =
'cbr';
115 $info[
'audio'][
'bits_per_sample'] =
$info[
'avr'][
'bits_per_sample'];
116 $info[
'audio'][
'sample_rate'] =
$info[
'avr'][
'sample_rate'];
117 $info[
'audio'][
'channels'] = (
$info[
'avr'][
'flags'][
'stereo'] ? 2 : 1);
118 $info[
'playtime_seconds'] = (
$info[
'avr'][
'sample_length'] /
$info[
'audio'][
'channels']) /
$info[
'avr'][
'sample_rate'];
119 $info[
'audio'][
'bitrate'] = (
$info[
'avr'][
'sample_length'] * ((
$info[
'avr'][
'bits_per_sample'] == 8) ? 8 : 16)) /
$info[
'playtime_seconds'];
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 BigEndian2Int($byteword, $synchsafe=false, $signed=false)