CC-3074: Give users the choice of which hardware sound API they wish to
use (instead of hardcoded to ALSA) - finished everything except LS part(including upgrade and UI)
This commit is contained in:
parent
06cbe215a3
commit
043f0c29a1
10 changed files with 62 additions and 2 deletions
|
@ -25,6 +25,17 @@ class Application_Form_StreamSetting extends Zend_Form
|
|||
$output_sound_device->setAttrib("readonly", true);
|
||||
}
|
||||
$this->addElement($output_sound_device);
|
||||
|
||||
$output_types = array("ALSA"=>"ALSA", "AO"=>"AO", "OSS"=>"OSS", "Portaudio"=>"Portaudio", "Pulseaudio"=>"Pulseaudio");
|
||||
$output_type = new Zend_Form_Element_Select('output_sound_device_type');
|
||||
$output_type->setLabel("Output Type")
|
||||
->setMultiOptions($output_types)
|
||||
->setValue($setting['output_sound_device_type'])
|
||||
->setDecorators(array('ViewHelper'));
|
||||
if($setting['output_sound_device'] != "true"){
|
||||
$output_type->setAttrib("disabled", "disabled");
|
||||
}
|
||||
$this->addElement($output_type);
|
||||
}
|
||||
|
||||
$icecast_vorbis_metadata = new Zend_Form_Element_Checkbox('icecast_vorbis_metadata');
|
||||
|
@ -39,7 +50,8 @@ class Application_Form_StreamSetting extends Zend_Form
|
|||
}
|
||||
|
||||
public function isValid($data){
|
||||
$this->populate(array("output_sound_device"=>$data['output_sound_device'], "icecast_vorbis_metadata"=>$data['icecast_vorbis_metadata']));
|
||||
$this->populate(array("output_sound_device"=>$data['output_sound_device'], "icecast_vorbis_metadata"=>$data['icecast_vorbis_metadata'],
|
||||
"output_sound_device_type"=>$data['output_sound_device_type']));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue