Plotting a waveform frmo file

I searched around for this a bit and there used to be some function in ofsoundplayer called ‘ofgetwavedata’, which I think got deprecated.

I am trying to visualize a waveform from a wav file (like you would see in audacity). I can display the current soundbuffer but I am not sure how to ‘read’ the whole waveform data without playing it - if that makes sense.

Is there a best practice on how to achieve this?

Checkout ofxSoundFile from ofxBasicSoundPlayer, it allows a file to be read and then copy to a ofSoundBuffer

ofSoundBuffer tbuffer;
ofxSoundFile soundFile;