aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2014-09-18 17:16:50 +0000
committerDimitri Sokolyuk <demon@dim13.org>2014-09-18 17:16:50 +0000
commit1179eff95346a0bbf93b4f19c17e2f7eec68ce91 (patch)
tree355165b9f90b636ce008845e4ee3e7d8ee8739ab
parent38b2260c4f816186ca2bfba6ecede3096ce40b9a (diff)
prepare for resize
-rw-r--r--Sgraph.c1
-rw-r--r--fft.c2
-rw-r--r--fft.h2
-rw-r--r--spectrogram.c4
4 files changed, 5 insertions, 4 deletions
diff --git a/Sgraph.c b/Sgraph.c
index 444750e..17d1b7d 100644
--- a/Sgraph.c
+++ b/Sgraph.c
@@ -203,6 +203,7 @@ Resize(Widget w)
width = winwidth / 2;
height = winheight / 4;
+ sw->sgraph.size = winwidth;
warnx("win: %dx%d", winwidth, winheight);
warnx("sub: %dx%d", width, height);
warnx("size: %d", sw->sgraph.size);
diff --git a/fft.c b/fft.c
index 48a084e..fd1185f 100644
--- a/fft.c
+++ b/fft.c
@@ -80,7 +80,7 @@ init_fft(size_t n)
}
int
-exec_fft(double *io)
+exec_fft(double *io, size_t n)
{
int i;
diff --git a/fft.h b/fft.h
index ddbc053..acbb205 100644
--- a/fft.h
+++ b/fft.h
@@ -20,7 +20,7 @@
__BEGIN_DECLS
int init_fft(size_t);
-int exec_fft(double *);
+int exec_fft(double *, size_t);
void free_fft(void);
__END_DECLS
diff --git a/spectrogram.c b/spectrogram.c
index 384edef..f01ec2a 100644
--- a/spectrogram.c
+++ b/spectrogram.c
@@ -84,8 +84,8 @@ worker(XtPointer data)
XtGetValues(data, arg, n);
size = read_sio(left, right, size);
- exec_fft(left);
- exec_fft(right);
+ exec_fft(left, size);
+ exec_fft(right, size);
//warnx("samples: %d, size: %d, %d", samples, size, n);
//warnx("l/r: %p (%lf) / %p (%lf)", left, *left, right, *right);