Trying to use a buzzer, tone and noTone freeze my program

For a given frequency passed into the tone() function, you get a constant duty cycle PWM signal.