Producing sound using hostplugindemo

I’m trying to create a plugin that host another plugin.
I’ve managed to compile the hostplugindemo, but the sound didn’t get into the plugin, then I’ve changed the processBlock function to run the (inner) plugin->processBlock function and the audio get into the plugin.
The problem is that I hear the sound twice, the original and the plugin’s output sound (since the plugin adds some delay I can hear it twice, without the delay I can hear that when I start the plugin the volume becomes higher)
how do I prevent it?