Commit 0e86ff14 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

remove unused variables

parent c6d27103
......@@ -486,7 +486,7 @@ void load_registers(FFT_NET *fft_net, SAMPLE *buf, int buf_form,
{
int *load_index = fft_net->load_index;
SAMPLE *window;
int index, i = 0, n = fft_net->n;
int index, i = 0;
if (trnsfrm_dir==FORWARD) window = fft_net->window;
else if (trnsfrm_dir==INVERSE) window = fft_net->inv_window;
......@@ -617,7 +617,7 @@ void store_registers(FFT_NET *fft_net, SAMPLE *buf, int buf_form,
{
int i;
SAMPLE real, imag, mag, phase;
SAMPLE real, imag;
int n;
i = 0;
......@@ -992,7 +992,7 @@ void short_to_float(short *short_buf, float *float_buf, int n)
void pd_fft(t_float *buf, int npoints, int inverse)
{
double renorm;
SAMPLE *fp, *fp2;
SAMPLE *fp;
int i;
renorm = (inverse ? npoints : 1.);
cfft((inverse ? INVERSE : FORWARD), npoints, RECTANGULAR,
......
......@@ -365,7 +365,7 @@ static t_signal *signal_freeborrowed;
/* call this when DSP is stopped to free all the signals */
void signal_cleanup(void)
{
t_signal **svec, *sig, *sig2;
t_signal *sig;
int i;
while ((sig = pd_this->pd_signals))
{
......@@ -432,9 +432,8 @@ void signal_makereusable(t_signal *sig)
t_signal *signal_new(int n, t_float sr)
{
int logn, n2, vecsize = 0;
int logn, vecsize = 0;
t_signal *ret, **whichlist;
t_sample *fp;
logn = ilog2(n);
if (n)
{
......@@ -566,8 +565,6 @@ t_signal *signal_newfromcontext(int borrowed)
void ugen_stop(void)
{
t_signal *s;
int i;
if (pd_this->pd_dspchain)
{
freebytes(pd_this->pd_dspchain,
......@@ -624,7 +621,6 @@ t_dspcontext *ugen_start_graph(int toplevel, t_signal **sp,
int ninlets, int noutlets)
{
t_dspcontext *dc = (t_dspcontext *)getbytes(sizeof(*dc));
int parent_vecsize, vecsize;
if (ugen_loud) post("ugen_start_graph...");
......@@ -729,7 +725,7 @@ static void ugen_doit(t_dspcontext *dc, t_ugenbox *u)
{
t_sigoutlet *uout;
t_siginlet *uin;
t_sigoutconnect *oc, *oc2;
t_sigoutconnect *oc;
t_class *class = pd_class(&u->u_obj->ob_pd);
int i, n;
/* suppress creating new signals for the outputs of signal
......@@ -882,7 +878,7 @@ static void ugen_doit(t_dspcontext *dc, t_ugenbox *u)
void ugen_done_graph(t_dspcontext *dc)
{
t_ugenbox *u, *u2;
t_ugenbox *u;
t_sigoutlet *uout;
t_siginlet *uin;
t_sigoutconnect *oc, *oc2;
......@@ -891,7 +887,7 @@ void ugen_done_graph(t_dspcontext *dc)
t_dspcontext *parent_context = dc->dc_parentcontext;
t_float parent_srate;
int parent_vecsize;
int period, frequency, phase, vecsize, calcsize;
int period, frequency, vecsize, calcsize;
t_float srate;
int chainblockbegin; /* DSP chain onset before block prolog code */
int chainblockend; /* and after block epilog code */
......@@ -958,7 +954,6 @@ void ugen_done_graph(t_dspcontext *dc)
(parent_vecsize * realoverlap * upsample);
frequency = (parent_vecsize * realoverlap * upsample)/
(vecsize * downsample);
phase = blk->x_phase;
srate = parent_srate * realoverlap * upsample / downsample;
if (period < 1) period = 1;
if (frequency < 1) frequency = 1;
......@@ -978,7 +973,6 @@ void ugen_done_graph(t_dspcontext *dc)
calcsize = (parent_context ? parent_context->dc_calcsize : vecsize);
downsample = upsample = 1;
period = frequency = 1;
phase = 0;
if (!parent_context) reblock = 1;
switched = 0;
}
......@@ -1031,7 +1025,7 @@ void ugen_done_graph(t_dspcontext *dc)
if (pd_class(zz) == vinlet_class)
vinlet_dspprolog((struct _vinlet *)zz,
dc->dc_iosigs, vecsize, calcsize, dsp_phase, period, frequency,
insigs, vecsize, calcsize, dsp_phase, period, frequency,
downsample, upsample, reblock, switched);
else if (pd_class(zz) == voutlet_class)
voutlet_dspprolog((struct _voutlet *)zz,
......
......@@ -122,7 +122,6 @@ static void import_rewind(t_import* x)
static void *import_new(t_symbol *s, int argc, t_atom *argv)
{
t_import *x = (t_import *)pd_new(import_class);
t_symbol *currentdir;
x->x_data_outlet = outlet_new(&x->x_obj, &s_symbol);
x->x_status_outlet = outlet_new(&x->x_obj, 0);
......
......@@ -48,9 +48,6 @@ typedef int32_t t_oss_int32;
#define OSS_XFERSIZE(chans, width) (DEFDACBLKSIZE * (chans) * (width))
/* GLOBALS */
static int linux_meters; /* true if we're metering */
static t_sample linux_inmax; /* max input amplitude */
static t_sample linux_outmax; /* max output amplitude */
static int linux_fragsize = 0; /* for block mode; block size (sample frames) */
extern int audio_blocksize; /* stolen from s_audio.c */
/* our device handles */
......@@ -77,7 +74,6 @@ t_sample *sys_soundin;
/* OSS-specific private variables */
static int oss_blockmode = 1; /* flag to use "blockmode" */
static char ossdsp[] = "/dev/dsp%d";
/* don't assume we can turn all 31 bits when doing float-to-fix;
otherwise some audio drivers (e.g. Midiman/ALSA) wrap around. */
......@@ -131,9 +127,8 @@ int oss_reset(int fd) {
void oss_configure(t_oss_dev *dev, int srate, int dac, int skipblocksize,
int suggestedblocksize)
{
int orig, param, nblk, fd = dev->d_fd, wantformat;
int orig, param, fd = dev->d_fd, wantformat;
int nchannels = dev->d_nchannels;
int advwas = sys_schedadvance;
audio_buf_info ainfo;
......@@ -272,10 +267,7 @@ int oss_open_audio(int nindev, int *indev, int nchin, int *chin,
char devname[20];
int n, i, fd, flags;
char buf[OSS_MAXSAMPLEWIDTH * DEFDACBLKSIZE * OSS_MAXCHPERDEV];
int num_devs = 0;
int wantmore=0;
int spread = 0;
audio_buf_info ainfo;
linux_nindevs = linux_noutdevs = 0;
/* mark devices unopened */
......@@ -551,7 +543,7 @@ in audio output and/or input. */
static void oss_doresync( void)
{
int dev, zeroed = 0, wantsize;
int dev, zeroed = 0;
char buf[OSS_MAXSAMPLEWIDTH * DEFDACBLKSIZE * OSS_MAXCHPERDEV];
audio_buf_info ainfo;
......@@ -630,11 +622,9 @@ static void oss_doresync( void)
int oss_send_dacs(void)
{
t_sample *fp1, *fp2;
long fill;
int i, j, dev, rtnval = SENDDACS_YES;
char buf[OSS_MAXSAMPLEWIDTH * DEFDACBLKSIZE * OSS_MAXCHPERDEV];
t_oss_int16 *sp;
t_oss_int32 *lp;
/* the maximum number of samples we should have in the ADC buffer */
int idle = 0;
int thischan;
......@@ -675,7 +665,6 @@ int oss_send_dacs(void)
for (dev = 0;dev < linux_nindevs; dev++)
if (linux_adcs[dev].d_space == 0)
{
audio_buf_info ainfo;
sys_microsleep(2000);
oss_calcspace();
if (linux_adcs[dev].d_space != 0) continue;
......
......@@ -703,7 +703,7 @@ extern t_class *glob_pdobject;
/* start a midi settings dialog window */
void glob_midi_properties(t_pd *dummy, t_floatarg flongform)
{
char buf[1024 + 2 * MAXNDEV*(DEVDESCSIZE+4)];
//char buf[1024 + 2 * MAXNDEV*(DEVDESCSIZE+4)];
/* these are the devices you're using: */
int nindev, midiindev[MAXMIDIINDEV];
int noutdev, midioutdev[MAXMIDIOUTDEV];
......@@ -780,9 +780,9 @@ void glob_midi_properties(t_pd *dummy, t_floatarg flongform)
if (sys_midiapi == API_ALSA)
{
// sprintf(buf,
//"pdtk_alsa_midi_dialog %%s \
//%d %d %d %d %d %d %d %d \
//%d 1\n",
//"pdtk_alsa_midi_dialog %%s "
//"%d %d %d %d %d %d %d %d "
//"%d 1\n",
// midiindev1, midiindev2, midiindev3, midiindev4,
// midioutdev1, midioutdev2, midioutdev3, midioutdev4,
// (flongform != 0));
......@@ -795,9 +795,9 @@ void glob_midi_properties(t_pd *dummy, t_floatarg flongform)
gui_end_array();
gui_end_vmess();
// sprintf(buf,
//"pdtk_midi_dialog %%s \
//%d %d %d %d %d %d %d %d \
//%d\n",
//"pdtk_midi_dialog %%s "
//"%d %d %d %d %d %d %d %d "
//"%d\n",
// midiindev1, midiindev2, midiindev3, midiindev4,
// midioutdev1, midioutdev2, midioutdev3, midioutdev4,
// (flongform != 0));
......@@ -928,7 +928,7 @@ int sys_mididevnametonumber(int output, const char *name)
void sys_mididevnumbertoname(int output, int devno, char *name, int namesize)
{
char indevlist[MAXNDEV*DEVDESCSIZE], outdevlist[MAXNDEV*DEVDESCSIZE];
int nindevs = 0, noutdevs = 0, i;
int nindevs = 0, noutdevs = 0;
if (devno < 0)
{
*name = 0;
......
......@@ -242,7 +242,6 @@ static int alsa_nmidiindevs, alsa_nmidioutdevs, alsa_initted;
void midi_alsa_init(void)
{
int i;
if (alsa_initted)
return;
alsa_initted = 1;
......
......@@ -513,7 +513,7 @@ FILE *sys_fopen(const char *filename, const char *mode)
#include <stdarg.h>
int sys_open(const char *path, int oflag, ...)
{
int i, fd;
int fd;
char pathbuf[MAXPDSTRING];
sys_bashfilename(path, pathbuf);
if (oflag & O_CREAT)
......@@ -770,26 +770,20 @@ t_symbol *sys_decodedialog(t_symbol *s)
/* start a search path dialog window */
void glob_start_path_dialog(t_pd *dummy)
{
char buf[MAXPDSTRING];
int i;
t_namelist *nl;
//sys_gui("global pd_path; set pd_path {}\n");
gui_start_vmess("gui_path_properties", "xii",
dummy,
sys_usestdpath,
sys_verbose
);
gui_start_array();
for (nl = sys_searchpath, i = 0; nl; nl = nl->nl_next, i++)
for (nl = sys_searchpath; nl; nl = nl->nl_next)
{
//sys_vgui("lappend pd_path {%s}\n", nl->nl_string);
gui_s(nl->nl_string);
}
gui_end_array();
gui_end_vmess();
//sprintf(buf, "pdtk_path_dialog %%s %d %d\n", sys_usestdpath, sys_verbose);
//gfxstub_new(&glob_pdobject, (void *)glob_start_path_dialog, buf);
}
/* new values from dialog window */
......@@ -811,27 +805,20 @@ void glob_path_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv)
/* start a startup dialog window */
void glob_start_startup_dialog(t_pd *dummy)
{
char buf[MAXPDSTRING];
int i;
t_namelist *nl;
//sys_gui("global pd_startup; set pd_startup {}\n");
gui_start_vmess("gui_lib_properties", "xis",
dummy,
sys_defeatrt,
sys_flags->s_name
);
gui_start_array();
for (nl = sys_externlist, i = 0; nl; nl = nl->nl_next, i++)
for (nl = sys_externlist; nl; nl = nl->nl_next)
{
//sys_vgui("lappend pd_startup {%s}\n", nl->nl_string);
gui_s(nl->nl_string);
}
gui_end_array();
gui_end_vmess();
//sprintf(buf, "pdtk_startup_dialog %%s %d \"%s\"\n", sys_defeatrt,
// sys_flags->s_name);
//gfxstub_new(&glob_pdobject, (void *)glob_start_startup_dialog, buf);
}
/* new values from dialog window */
......
......@@ -758,7 +758,6 @@ void x_arithmetic_setup(void)
{
t_symbol *binop1_sym = gensym("operators");
t_symbol *binop23_sym = gensym("otherbinops");
t_symbol *math_sym = gensym("math");
binop1_plus_class = class_new(gensym("+"), (t_newmethod)binop1_plus_new, 0,
sizeof(t_binop), 0, A_DEFFLOAT, 0);
......
......@@ -533,10 +533,8 @@ static int array_rangeop_getrange(t_array_rangeop *x,
{
t_glist *glist;
t_array *a = array_client_getbuf(&x->x_tc, &glist);
char *elemp;
int stride, fieldonset, arrayonset, nitem, i, type;
int stride, fieldonset, arrayonset, nitem, type;
t_symbol *arraytype;
double sum;
t_template *template;
if (!a)
return (0);
......@@ -720,8 +718,8 @@ static void array_random_seed(t_array_random *x, t_floatarg f)
static void array_random_bang(t_array_random *x)
{
char *itemp, *firstitem;
int stride, nitem, arrayonset, i;
char *firstitem;
int stride, nitem, arrayonset;
if (!array_rangeop_getrange(&x->x_r, &firstitem, &nitem, &stride,
&arrayonset))
......
......@@ -135,6 +135,8 @@ static void pdsymbol_anything(t_pdsymbol *x, t_symbol *s, int ac, t_atom *av)
empty lists aren't equivalent to "bang"??? Should Pd's message passer
always check and call the more specific method, or should it be the
object's responsibility? Dunno... */
/* Currently this function isn't used... */
/*
static void pdsymbol_list(t_pdsymbol *x, t_symbol *s, int ac, t_atom *av)
{
if (!ac)
......@@ -143,6 +145,7 @@ static void pdsymbol_list(t_pdsymbol *x, t_symbol *s, int ac, t_atom *av)
pdsymbol_symbol(x, av->a_w.w_symbol);
else pdsymbol_anything(x, s, ac, av);
}
*/
void pdsymbol_setup(void)
{
......
......@@ -945,7 +945,6 @@ static void *stripnote_new(void )
static void stripnote_float(t_stripnote *x, t_float f)
{
t_hang *hang;
if (!x->x_velo) return;
outlet_float(x->x_velout, x->x_velo);
outlet_float(x->x_pitchout, f);
......
......@@ -420,7 +420,7 @@ typedef struct _oscparse
static t_symbol *grabstring(int argc, t_atom *argv, int *ip, int slash)
{
char buf[MAXPDSTRING];
int first, nchar;
int nchar;
if (slash)
while (*ip < argc && argv[*ip].a_w.w_float == '/')
(*ip)++;
......@@ -681,7 +681,7 @@ static void oscformat_list(t_oscformat *x, t_symbol *s, int argc, t_atom *argv)
msgindex += ROUNDUPTO4(strlen(argv[j].a_w.w_symbol->s_name) + 1);
else if (typecode == 'b')
{
int blobsize = 0x7fffffff, blobindex;
int blobsize = 0x7fffffff;
/* check if we have a nonnegative size field */
if (argv[j].a_type == A_FLOAT &&
(int)(argv[j].a_w.w_float) >= 0)
......
......@@ -122,7 +122,6 @@ static void netsend_readbin(t_netsend *x, int fd)
static void netsend_doit(void *z, t_binbuf *b)
{
t_atom messbuf[1024];
t_netsend *x = (t_netsend *)z;
int msg, natom = binbuf_getnatom(b);
t_atom *at = binbuf_getvec(b);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment