Example RecordingDemo bug

I think there is a bug in the supplied RecordingDemo example that comes with Tracktion Engine.

To reproduce:

  • Create two tracks
  • Arm and record audio to first track
  • Arm second track.
  • Press play.

While audio of first track is being played press record.

In my case I get a flood of JUCE Assertion failure in tracktion_EditTimeRange.cpp:16 as the system grinds to a halt. At the same time, hundreds of 784byte .wav files are written to disk.

Stepping through it looks like the start and end times being fed to EditTimeRange() are wonky, triggering the JAssertion but I can’t tell why yet.

To be able to record a section of audio on track 2 whilst track 1 continues playing.

I tried digging into this issue as described here:

As my issue is different to the OPs on that thread it seemed appropriate to start a new one.

Looking forward to any thoughts or insight on this!