toneAC v1.2 - Twice the volume, higher quality, higher frequency, etc.

Thanks for your reply Tim.

Pins are PD4 and PD5 (PWM1B and PWM1A).

The example works perfectly:

void loop() {
  for (unsigned long freq = 150; freq <= 15000; freq += 10){  
    toneAC(freq); // Play the frequency (150 Hz to 15 kHz).
    delay(1);     // Wait 1 ms so you can hear it.
  }

Just not the volume, which is really what I'm after.