getid3_flac example

switch ($info['audio']['dataformat']) {
            case 'vorbis':
                $filedata = $this->fread($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_length']);
                $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['packet_type'] = getid3_lib::LittleEndian2Int(substr($filedata, 0, 1));
                $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['stream_type'] =                              substr($filedata, 1, 6); // hard-coded to 'vorbis'
                $this->ParseVorbisComments();
                break;

            case 'flac':
                $flac = new getid3_flac($this->getid3);
                if (!$flac->parseMETAdata()) {
                    $this->error('Failed to parse FLAC headers');
                    return false;
                }
                unset($flac);
                break;

            case 'speex':
                $this->fseek($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_length'], SEEK_CUR);
                $this->ParseVorbisComments();
                break;

            
Home | Imprint | This part of the site doesn't use cookies.