You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in the library, if a zero frequency is specified to play_tone, a ValueError is thrown. In most other similar implementations, a value of 0 simply represents silence, or rest, for the duration specified. There is no reason for this implementation to be different. Also, this change is not likely to affect any user's existing code.
Current Code:
def play_tone(frequency, duration):
"""..."""
if frequency <= 0:
raise ValueError("The frequency has to be greater than 0.")
Suggested change:
def play_tone(frequency, duration):
"""..."""
if frequency < 0:
raise ValueError("Negative frequencies are not allowed.")
The text was updated successfully, but these errors were encountered:
Currently in the library, if a zero frequency is specified to play_tone, a ValueError is thrown. In most other similar implementations, a value of 0 simply represents silence, or rest, for the duration specified. There is no reason for this implementation to be different. Also, this change is not likely to affect any user's existing code.
Current Code:
Suggested change:
The text was updated successfully, but these errors were encountered: