Newbie programmer here, trying to wrap my head around OpenSL ES on Android using the NDK.

I'm usually able to solve most of my own programming questions through trial and error, but I am having trouble figuring out how to correctly use SLVisualizationtItf. Is there any sample code where this is used? How do I correctly create and set a callback?