void FeedbackDelayNetworkNode::process() {
	//First, check an d set properties.
	//We just do this inline because it's trivial.
	if(werePropertiesModified(this, Lav_FDN_DELAYS)) {
		setDelays(getProperty(Lav_FDN_DELAYS).getFloatArrayPtr());
	}
	if(werePropertiesModified(this, Lav_FDN_MATRIX)) {
		setMatrix(getProperty(Lav_FDN_MATRIX).getFloatArrayPtr());
	}
	if(werePropertiesModified(this, Lav_FDN_OUTPUT_GAINS)) {
		setOutputGains(getProperty(Lav_FDN_OUTPUT_GAINS).getFloatArrayPtr());
	}
	if(werePropertiesModified(this, Lav_FDN_FILTER_TYPES, Lav_FDN_FILTER_FREQUENCIES)) {
		configureFilters(
		getProperty(Lav_FDN_FILTER_TYPES).getIntArrayPtr(),
		getProperty(Lav_FDN_FILTER_FREQUENCIES).getFloatArrayPtr());
	}
	for(int i = 0	; i < block_size; i++) {
		network->computeFrame(last_output);
		for(int j = 0; j < num_output_buffers; j++) { 	
			output_buffers[j][i] = last_output[j]*gains[j];
			next_input[j] = input_buffers[j][i];
			//Apply the filter.
			last_output[j] = filters[j]->tick(last_output[j]);
		}
		network->advance(next_input, last_output);
	}
}
示例#2
0
void ViewManager::initActions()
{
    mActionSelectView = new KSelectAction(i18n("Select View"), 0, mCore->actionCollection(), "select_view");
#if KDE_VERSION >= 309
    mActionSelectView->setMenuAccelsEnabled(false);
#endif
    connect(mActionSelectView, SIGNAL(activated(const QString &)),
            SLOT(setActiveView(const QString &)));

    KAction *action;

    action = new KAction(i18n("Modify View..."), "configure", 0, this,
                         SLOT(editView()), mCore->actionCollection(),
                         "view_modify");
    action->setWhatsThis(
        i18n("By pressing this button a dialog opens that allows you to modify the view of the addressbook. There you can add or remove fields that you want to be shown or hidden in the addressbook like the name for example."));

    action = new KAction(i18n("Add View..."), "window_new", 0, this,
                         SLOT(addView()), mCore->actionCollection(),
                         "view_add");
    action->setWhatsThis(
        i18n("You can add a new view by choosing one from the dialog that appears after pressing the button. You have to give the view a name, so that you can distinguish between the different views."));

    mActionDeleteView = new KAction(i18n("Delete View"), "view_remove", 0,
                                    this, SLOT(deleteView()),
                                    mCore->actionCollection(), "view_delete");
    mActionDeleteView->setWhatsThis(i18n("By pressing this button you can delete the actual view, which you have added before."));

    action = new KAction(i18n("Refresh View"), "reload", 0, this,
                         SLOT(refreshView()), mCore->actionCollection(),
                         "view_refresh");
    action->setWhatsThis(i18n("The view will be refreshed by pressing this button."));

    action = new KAction(i18n("Edit &Filters..."), "filter", 0, this,
                         SLOT(configureFilters()), mCore->actionCollection(),
                         "options_edit_filters");
    action->setWhatsThis(i18n("Edit the contact filters<p>You will be presented with a dialog, where you can add, remove and edit filters."));
}