Mercurial > hg > sonic-visualiser
diff transform/RealTimePluginTransform.cpp @ 52:527598e2fa10
* Handle generator transforms (plugins whose channel count isn't dependent on
number of audio inputs, as they have none)
* Be less keen to suspend writing FFT data in spectrogram repaint -- only do it
if we find we actually need to query the FFT data (i.e. we aren't repainting
an area that hasn't been generated at all yet)
author | Chris Cannam |
---|---|
date | Tue, 10 Oct 2006 19:04:57 +0000 |
parents | 5a72bf7490ae |
children | ca1e3f5657d5 |
line wrap: on
line diff
--- a/transform/RealTimePluginTransform.cpp Mon Oct 09 10:49:46 2006 +0000 +++ b/transform/RealTimePluginTransform.cpp Tue Oct 10 19:04:57 2006 +0000 @@ -75,8 +75,13 @@ if (m_outputNo == -1) { + size_t outputChannels = m_plugin->getAudioOutputCount(); + if (outputChannels > input->getChannelCount()) { + outputChannels = input->getChannelCount(); + } + WritableWaveFileModel *model = new WritableWaveFileModel - (input->getSampleRate(), input->getChannelCount()); //!!! + (input->getSampleRate(), outputChannels); m_output = model;