[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/gallery/data/ -> galleryresourcesoundmetadatareader.class.php (source)

   1  <?php
   2  
   3      lt_include( PLOG_CLASS_PATH."class/gallery/data/galleryresourcebasemetadatareader.class.php" );
   4  
   5      /**
   6       * \ingroup Gallery
   7       *
   8       * methods for fetching metadata from sound resources
   9       */
  10      class GalleryResourceSoundMetadataReader extends GalleryResourceBaseMetadataReader
  11      {
  12      	function GalleryResourceSoundMetadataReader( $resource )
  13          {
  14              $this->GalleryResourceBaseMetadataReader( $resource );
  15          }
  16  
  17          /**
  18           * @return the number of channels of the audio file
  19           */
  20          function getChannels()
  21          {
  22              return $this->_metadata["audio"]["channels"];
  23          }
  24  
  25          /**
  26           * @return the rate in Hz at which the audio was sampled
  27           */
  28          function getSampleRate()
  29          {
  30              return $this->_metadata["audio"]["sample_rate"];
  31          }
  32  
  33          /**
  34           * @return the channel mode: mono or stereo
  35           */
  36          function getChannelMode()
  37          {
  38              return $this->_metadata["audio"]["channelmode"];
  39          }
  40  
  41          /**
  42           * @return the format of the audio file
  43           */
  44          function getFormat()
  45          {
  46              return $this->_metadata["audio"]["dataformat"];
  47          }
  48          
  49          /**
  50           * @return a nicer, human-readable string with the length of the file
  51           */        
  52  		function getLengthString()
  53          {
  54              return $this->_metadata["playtime_string"];
  55          }
  56      }
  57  
  58  ?>


Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics