diff options
author | unknown <dm2515@eews303a-042.ic.ac.uk> | 2018-01-16 17:45:27 +0000 |
---|---|---|
committer | unknown <dm2515@eews303a-042.ic.ac.uk> | 2018-01-16 17:45:27 +0000 |
commit | 6c22e02b2b9c645178f2f9351d9053d530caeb21 (patch) | |
tree | 8d3dd8c25e26a10c38205644ce3d1a33ea30a785 /lab2/RTDSP/sine.c | |
parent | 24db337dfc71af9ac3428f16149f170c254b21e4 (diff) | |
download | NoiseSilencer-6c22e02b2b9c645178f2f9351d9053d530caeb21.tar.gz NoiseSilencer-6c22e02b2b9c645178f2f9351d9053d530caeb21.zip |
Added lab2 and lab3
Diffstat (limited to 'lab2/RTDSP/sine.c')
-rw-r--r-- | lab2/RTDSP/sine.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lab2/RTDSP/sine.c b/lab2/RTDSP/sine.c index 54fd65e..aa2653e 100644 --- a/lab2/RTDSP/sine.c +++ b/lab2/RTDSP/sine.c @@ -178,7 +178,7 @@ float sinegen(void) // temporary variable used to output values from function float wave; - wave = table[(int)(sine_freq / (float)sampling_freq * (float)SINE_TABLE_SIZE * sine_index) % SINE_TABLE_SIZE]; + wave = table[(int)((sine_freq / (float)sampling_freq) * (float)SINE_TABLE_SIZE * sine_index) % SINE_TABLE_SIZE]; sine_index++; |