This bit is only responsible for the starting point of the envelope and the direction.
On In other words, we have:
 volume = 0 if attack else 15  # Start at 0 for attack, 15 for decay
 direction = 1 if attack else -1  # Upward for attack, downward for decay