How to set a input signal buffer as AudioThumbnail Class's source?

Adding buffers into the thumbnail doesn’t work that way, you need to call addBlock() when new audio is available and reset() before starting to add the buffers.

If you are looking to simply display audio levels as a scrolling waveform, Juce already has the AudioVisualiserComponent, which might be a bit easier to use.

Is there any example show how to do this?

The Juce audio recording example (JUCE\examples\Audio\AudioRecordingDemo.h) shows use of both AudioThumbnail and AudioVisualiserComponent for live input audio buffers.

1 Like