From 1179eff95346a0bbf93b4f19c17e2f7eec68ce91 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Thu, 18 Sep 2014 17:16:50 +0000 Subject: prepare for resize --- Sgraph.c | 1 + fft.c | 2 +- fft.h | 2 +- spectrogram.c | 4 ++-- 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); -- cgit v1.2.3