Пример #1
0
void FlangerNode::NodeRegistered() {

	PRINT(("FlangerNode::NodeRegistered()\n"));

	// Start the BMediaEventLooper thread
	SetPriority(B_REAL_TIME_PRIORITY);
	Run();

	// figure preferred ('template') format
	m_preferredFormat.type = B_MEDIA_RAW_AUDIO;
	getPreferredFormat(m_preferredFormat);

	// initialize current format
	m_format.type = B_MEDIA_RAW_AUDIO;
	m_format.u.raw_audio = media_raw_audio_format::wildcard;

	// init input
	m_input.destination.port = ControlPort();
	m_input.destination.id = ID_AUDIO_INPUT;
	m_input.node = Node();
	m_input.source = media_source::null;
	m_input.format = m_format;
	strncpy(m_input.name, "Audio Input", B_MEDIA_NAME_LENGTH);

	// init output
	m_output.source.port = ControlPort();
	m_output.source.id = ID_AUDIO_MIX_OUTPUT;
	m_output.node = Node();
	m_output.destination = media_destination::null;
	m_output.format = m_format;
	strncpy(m_output.name, "Mix Output", B_MEDIA_NAME_LENGTH);

	// init parameters
	initParameterValues();
	initParameterWeb();
}
Пример #2
0
 /** Set the coefficient matrix (<b>A</b> in <b>Ax = b</b>) of the linear system */
 template <typename MatrixT> void setCoefficients(MatrixT const & coeffs_)
 {
   coeffs.setMatrix(coeffs_, getPreferredFormat(MatrixUtil::getFormat(coeffs_)));
 }