@Override public void assignExecutor(AudioTrackExecutor executor, boolean applyPrimordialState) { if (executorAssigned.compareAndSet(false, true)) { if (applyPrimordialState) { initialExecutor.applyStateToExecutor(executor); } activeExecutor = executor; } else { throw new IllegalStateException("Cannot play the same instance of a track twice, use track.makeClone()."); } }