Added configuration for audio channels
This commit is contained in:
parent
4bea49478c
commit
7004e53399
8 changed files with 130 additions and 17 deletions
|
|
@ -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}
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue