View Single Post
Old 06-24-2015, 11:31 AM   #25
Human being with feelings
Join Date: Jun 2015
Posts: 348

Originally Posted by Tale View Post
I have just tried myself, and changing REAPER's audio buffer size doesn't change the position of data[0], so your/mine/our code seems to be working fine. It does depend on clearing queues in Reset(), because else the posisiton of the first data[0] is semi-random. This is because immediately after loading your plug-in the host starts processing it, and most hosts will just keeps on processing continuously, whether you start/stop playback or not. This is why you might want to clear queues on playback, but you don't need to. Note that probably not all hosts will call Reset() on playback. But I guess the exact position of data[0] samples isn't important anyway, as long as they are FFT_BUFFER_SIZE samples apart.

void MyPlug::Reset()
	TRACE; IMutexLock lock(this);

	// Clear input queue.
	// Clear output queue.
	// Pre-add silence to output queue.
	outputBuffer.Add(NULL, sizeof(double)*FFT_BUFFER_SIZE);
This has no effect. It does not solve the original problem.
mviljamaa is offline   Reply With Quote