“Preview” Audio File

Hi,

I wonder if there is some good built-in way to “preview” (i.e. listen to) an audio file without loading it into an edit.

Obviously I could add a custom audio callback to the JUCE Device Manager and play it from there using an AudioSource but I thought there might be a better way!

Erik

There’s a function createEditForPreviewingFile that can be used for this. We use it for our previews, it just attaches itself to the audio device and then you play/loop it like any other Edit.

Thanks! Does this mean that a proxy file needs to be generated for each file that is previewed?

No, there’s actually a simpler timestretch/pitch method that’s used with preview files so they can be played back immediately. This should all be taken care of if you use the Edit:: createEditForPreviewingFile method.

Awesome!