Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add format and mix parameters to MonitorAction.php #149

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/PAMI/Message/Action/MonitorAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,17 @@ class MonitorAction extends ActionMessage
*
* @param string $channel Channel to monitor.
* @param string $filename Absolute path to target filename.
* @param string $format Recording format, default 'wav'.
* @param string $mix Mix channels, default 'true'.
*
* @return void
*/
public function __construct($channel, $filename)
public function __construct($channel, $filename, $format = 'wav', $mix = 'true')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, If these are not required to create this action, they should be set with setters, like we do in other actions

{
parent::__construct('Monitor');
$this->setKey('Channel', $channel);
$this->setKey('Mix', 'true');
$this->setKey('Format', 'wav');
$this->setKey('Mix', $mix);
$this->setKey('Format', $format);
$this->setKey('File', $filename);
}
}