PlayHead problems with loaded VST instance

I don’t know if I’m doing something wrong, but here’s my problem. I created a AudioProcessorGraph and I add a VST to a node. Everything works. But the graph does not get the playHead from my main AudioProcessor. So I just do this:


Which fixes the problem. But, for every new VST I add to the Graph, I need to do this. I also tried doing it for the graph hoping it would make all new VST Instances to get it too, but it doesn’t.

Shouldn’t everything that gets added to the graph follow the “child” PlayHead too?


No, you might have different things following different playheads. E.g. if you were using a graph to mix two files that are playing independently.

Oh, makes perfect sense. :oops: How dare me questioning the leader… :mrgreen: :wink: (just joking)

Thanks Jules, as always.


Sorry for waking up this old thread, but I was just looking at the docs, and AudioProcessor::setPlayHead is marked as “not for public use” .
Is it because it’s not supposed to be necessary ? Or is it because it’s dangerous to use in our own code ? Looking at the code, it seems perfectly ok to use it …

If we want to do that, we must make the AudioSources holding the file inherit from AudioProcessor, otherwise, you can’t put them into a graph, right ?

I think that comment might be out-of-date - originally, it was used internally by the plugin subclasses, but if people are writing their own subclasses, they’d need to call it.


Thanks and thanks :wink:

Oh by the way, I couldn’t find any class which wraps an AudioSource, and inherits from AudioProcessor. Should I write it, or is there already such a class and I didn’t see it ?

No, don’t think I ever did one of those.

I posted one a ways back…don’t know if it still works(or if I updated mine), but it’ll give you a start… it’s really simple, but it’ll save you some typing!

Great, thanks for the inspiration :slight_smile: