Best way to draw audio buffers

Hi I m confused about using the AudioThumbnail Class.
I tried of using it to draw my waveform but i m just getting one single mid line.
What should be the start and End time for the drawChannel??
Is it in millisecond or in seconds.???

What should i give the sourceSamplesPerThumbnailSample in the constructor of the AudioThumbnail???
I have given 1. Is this ok.???

The time is in seconds and can go above the end of the track time, you will just get a blank bit at the end.

The sourceSamplesPerThumbnailSample is the resolution in which the waveform is cached. Higher numbers mean the waveform will draw more quickly from the cache and will also load quicker when inputting the stream. (You can see this if you refresh the thumnail as it is being loaded).

If you need to display at lower resolutions than your sourceSamplesPerThumbnailSample size eg. very zoomed in the thumnail will re-read directly from the reader so the wave will still be displayed.

I normally use 512 for the sourceSamplesPerThumbnailSample.