Ejemplo n.º 1
0
bool Window::verifyAndSpecifyTypes(Types const& _inTypes, Types& o_outTypes)
{
	Typed<Contiguous> in = _inTypes[0];
	if (!in || in->arity() != 1)
		return false;
	o_outTypes[0] = WaveChunk(m_size + m_padding, in->frequency() / float(m_hop), in->frequency(), in->max(), in->min());
	return true;
}
Ejemplo n.º 2
0
bool Fan::verifyAndSpecifyTypes(Types const& _inTypes, Types& _outTypes)
{
	Typed<Spectrum> in = _inTypes[0];
	if (!in) return false;
	m_outBins = in->bins() / _outTypes.count();
	// Should be FreqSteppedSpectrum with offset if possible.
	// In general add a method to Spectrum to get a new type based on subset.
	_outTypes = Spectrum(m_outBins, in->frequency());
	return true;
}