Can someone help me with this problem?
say ive got a sine wave written into a buffer of samples.
i know the frequency, all i need to do is calculate the amplitude of it and the phase from the start of the buffer.
thanks if someone cares...
Try scanning the buffer for the first maximum and the first minimum. That should give you the crest and trough of one cycle of the wave. Then you can find the amplitude as half the difference between those two, and you can calculate the phase by how far into the buffer the first maximum is, compared to the frequency.
oh shit... i shouldve thought more...