Файл: vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Audio/AudioResamplableFilter.php
Строк: 28
<?php
/*
* This file is part of PHP-FFmpeg.
*
* (c) Alchemy <dev.team@alchemy.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace FFMpegFiltersAudio;
use FFMpegFormatAudioInterface;
use FFMpegMediaAudio;
class AudioResamplableFilter implements AudioFilterInterface
{
/** @var string */
private $rate;
/** @var int */
private $priority;
public function __construct($rate, $priority = 0)
{
$this->rate = $rate;
$this->priority = $priority;
}
/**
* {@inheritdoc}
*/
public function getPriority()
{
return $this->priority;
}
/**
* @return int
*/
public function getRate()
{
return $this->rate;
}
/**
* {@inheritdoc}
*/
public function apply(Audio $audio, AudioInterface $format)
{
return ['-ac', 2, '-ar', $this->rate];
}
}