Mercurial > audlegacy
comparison Plugins/Input/tonegen/tonegen.c @ 701:d539e5c5f730 trunk
[svn] Fixes of the remaining GCC 4.1 warnings from external contributor Diego "Flameeyes" Petteno (Gentoo).
author | chainsaw |
---|---|
date | Sun, 26 Feb 2006 13:08:35 -0800 |
parents | 7fa1738514d5 |
children | 0cf543c6a088 |
comparison
equal
deleted
inserted
replaced
700:99382cddf771 | 701:d539e5c5f730 |
---|---|
69 | 69 |
70 static void* play_loop(void *arg) | 70 static void* play_loop(void *arg) |
71 { | 71 { |
72 GArray* frequencies = arg; | 72 GArray* frequencies = arg; |
73 gint16 data[BUF_SAMPLES]; | 73 gint16 data[BUF_SAMPLES]; |
74 int i; | 74 gsize i; |
75 struct { | 75 struct { |
76 double wd; | 76 double wd; |
77 unsigned int period, t; | 77 unsigned int period, t; |
78 } *tone; | 78 } *tone; |
79 | 79 |
90 | 90 |
91 while (going) | 91 while (going) |
92 { | 92 { |
93 for (i = 0; i < BUF_SAMPLES; i++) | 93 for (i = 0; i < BUF_SAMPLES; i++) |
94 { | 94 { |
95 int j; | 95 gsize j; |
96 double sum_sines; | 96 double sum_sines; |
97 | 97 |
98 for (sum_sines = 0, j = 0; j < frequencies->len; j++) | 98 for (sum_sines = 0, j = 0; j < frequencies->len; j++) |
99 { | 99 { |
100 sum_sines += sin(tone[j].wd * tone[j].t); | 100 sum_sines += sin(tone[j].wd * tone[j].t); |
151 | 151 |
152 static char* tone_title(char *filename) | 152 static char* tone_title(char *filename) |
153 { | 153 { |
154 GArray *freqs; | 154 GArray *freqs; |
155 char* title; | 155 char* title; |
156 int i; | 156 gsize i; |
157 | 157 |
158 freqs = tone_filename_parse(filename); | 158 freqs = tone_filename_parse(filename); |
159 if (freqs == NULL) | 159 if (freqs == NULL) |
160 return NULL; | 160 return NULL; |
161 | 161 |