Audio encryption indicates if the actual audio stream is * encrypted, and by whom. * * The identifier is a URL containing an email address, or a link to a location * where an email address can be found, that belongs to the organisation * responsible for this specific encrypted audio file. Questions regarding the * encrypted audio should be sent to the email address specified. There may be * more than one AENC frame in a tag, but only one with the same owner * identifier. * * @package php-reader * @subpackage ID3 * @author Sven Vollbehr * @copyright Copyright (c) 2008 BEHR Software Systems * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @version $Rev$ */ final class ID3_Frame_AENC extends ID3_Frame { /** @var string */ private $_id; /** @var integer */ private $_previewStart; /** @var integer */ private $_previewLength; /** * Constructs the class with given parameters and parses object related data. * * @param Reader $reader The reader object. */ public function __construct($reader) { parent::__construct($reader); list($this->_id, $this->_data) = preg_split("/\\x00/", $this->_data, 2); $this->_previewStart = substr($this->_data, 0, 2); $this->_previewLength = substr($this->_data, 2, 2); $this->_data = substr($this->_data, 4); } /** * Returns the owner identifier string. * * @return string */ public function getIdentifier() { return $this->_id; } /** * Returns the pointer to an unencrypted part of the audio in frames. * * @return integer */ public function getPreviewStart() { return $this->_previewStart; } /** * Returns the length of the preview in frames. * * @return integer */ public function getPreviewLength() { return $this->_previewLength; } /** * Returns the encryption info. * * @return string */ public function getData() { return $this->_data; } }