You are here

public function PHPVideoToolkit::setAudioSampleFrequency in Video 7

Same name and namespace in other branches
  1. 7.2 libraries/phpvideotoolkit/phpvideotoolkit.php5.php \PHPVideoToolkit::setAudioSampleFrequency()

* Sets the audio sample frequency for audio outputs * * @access public *

Parameters

integer $audio_sample_frequency Valid values are 11025, 22050, 44100: * @return boolean false on error encountered, true otherwise

2 calls to PHPVideoToolkit::setAudioSampleFrequency()
PHPVideoToolkit::extractAudio in libraries/phpvideotoolkit/phpvideotoolkit.php5.php
* This is an alias for setFormat, but restricts it to audio only formats. * * @access public *
PHPVideoToolkit::setFormatToFLV in libraries/phpvideotoolkit/phpvideotoolkit.php5.php
* A shortcut for converting video to FLV. * * @access public *

File

libraries/phpvideotoolkit/phpvideotoolkit.php5.php, line 1386

Class

PHPVideoToolkit

Code

public function setAudioSampleFrequency($audio_sample_frequency) {

  //			validate input
  if (!in_array(intval($audio_sample_frequency), array(
    11025,
    22050,
    44100,
  ))) {
    return $this
      ->_raiseError('setAudioSampleFrequency_valid_frequency', array(
      'frequency' => $audio_sample_frequency,
    ));

    //<-			exits
  }
  return $this
    ->addCommand('-ar', $audio_sample_frequency);
}