How to visualize audio in real time from file while the audio keeps playing from AudioTransportSource?

I’ve been trying to visualize the sound after it being read from the file. I read it using AudioFormatReader. read(float *const *destChannels, [numDestChannels, startSampleInSource, numSamplesToRead) . I want to visualize it in real time while the audio plays.