Added configuration for audio channels

This commit is contained in:
Simon Schick 2014-06-25 09:55:00 +02:00
commit 7004e53399
8 changed files with 130 additions and 17 deletions

View file

@ -27,6 +27,9 @@ abstract class DefaultAudio extends EventEmitter implements AudioInterface, Prog
/** @var integer */
protected $audioKiloBitrate = 128;
/** @var integer */
protected $audioChannels = null;
/**
* {@inheritdoc}
*/
@ -90,6 +93,31 @@ abstract class DefaultAudio extends EventEmitter implements AudioInterface, Prog
return $this;
}
/**
* {@inheritdoc}
*/
public function getAudioChannels()
{
return $this->audioChannels;
}
/**
* Sets the channels value.
*
* @param integer $channels
* @throws InvalidArgumentException
*/
public function setAudioChannels($channels)
{
if ($channels < 1) {
throw new InvalidArgumentException('Wrong channels value');
}
$this->audioChannels = (int) $channels;
return $this;
}
/**
* {@inheritdoc}
*/