AudioTransportSource Glitching


Hello there juce meisters,

First post - great work Jules, loving the library…

I’m using the above class to playback wavefiles and noticed that with the latest version of Juce I hear loud glitches when the transport reaches the end of (most) wav/aiff files?

I checked the jucedemo and it’s the same. Tried another machine, same again.

I’m on the tip using 10.5.8. Anyone else experiencing this?



Haven’t noticed this, but if the last sample of your file is non-zero the player won’t attempt to de-click it. Does it glitch with a file that definitely fades to zero before its end?


I just checked this using the tip from last night and with a pure 1k tone with a fade in and fade out the fade looks like this at the end:

So it’s not just a single click but a more garbled glitch.

It appears to measure approx one block size (512 samples in this case). Same with wav or aif but I haven’t tried different bit depths.

This is generated using the Juce demo from the tip sending the data out via soundflower into an audio app but it glitches when sent out directly too.

It seems to be dependent on the content, 100hz looks like this:


weird… ok, thanks, I’ll have a look.


… from the look of the waveforms perhaps, Jules, you have just invented a new method of generating bandlimited pulse waves?!

BTW I tried it with a completely silent file and it doesn’t happen (which makes sense with the other examples)


This seems fixed, going by tests using new audio pages in the Juce demo. Jules, did you find the problem?


Yes - sorry, I meant to post about it but forgot. It was just a bug in a couple of the audio format readers that was producing garbage if you read past the end of the file.