import math
import itertools


def sine_wave(amplitude=0.5, frequency=440., sample_rate=44100.):
    """
    Calculates a sine-wave
    :param amplitude: the amplitude of the wave
    :param frequency: the frequency of the wave
    :param sample_rate: the sample rate of the wave
    :return: an infinite iterator of the sine wave
    """
    increment = (2 * math.pi) / (sample_rate / frequency)
    return itertools.cycle(amplitude * math.sin(x * increment) for x in range(int(sample_rate / frequency)))