Commit ad921fce authored by Mathieu L Bouchard's avatar Mathieu L Bouchard
Browse files

remove unused vars

parent 1435e5d4
......@@ -260,7 +260,6 @@ static t_int *vline_tilde_perform(t_int *w)
double f = x->x_value;
double inc = x->x_inc;
double msecpersamp = x->x_msecpersamp;
double samppermsec = x->x_samppermsec;
double timenow = clock_gettimesince(x->x_referencetime) - n * msecpersamp;
t_vseg *s = x->x_list;
for (i = 0; i < n; i++)
......
......@@ -22,7 +22,7 @@ typedef struct _dac
static void *dac_new(t_symbol *s, int argc, t_atom *argv)
{
t_dac *x = (t_dac *)pd_new(dac_class);
t_atom defarg[2], *ap;
t_atom defarg[2];
int i;
if (!argc)
{
......@@ -83,7 +83,7 @@ typedef struct _adc
static void *adc_new(t_symbol *s, int argc, t_atom *argv)
{
t_adc *x = (t_adc *)pd_new(adc_class);
t_atom defarg[2], *ap;
t_atom defarg[2];
int i;
if (!argc)
{
......
......@@ -9,7 +9,6 @@
extern int ugen_getsortno(void);
#define DEFDELVS 64 /* LATER get this from canvas at DSP time */
static int delread_zero = 0; /* four bytes of zero for delread~, vd~ */
/* ----------------------------- delwrite~ ----------------------------- */
static t_class *sigdelwrite_class;
......@@ -169,13 +168,11 @@ static void *sigdelread_new(t_symbol *s, t_floatarg f)
static void sigdelread_float(t_sigdelread *x, t_float f)
{
int samps;
t_sigdelwrite *delwriter =
(t_sigdelwrite *)pd_findbyclass(x->x_sym, sigdelwrite_class);
x->x_deltime = f;
if (delwriter)
{
int delsize = delwriter->x_cspace.c_n;
x->x_delsamps = (int)(0.5 + x->x_sr * x->x_deltime)
+ x->x_n - x->x_zerodel;
if (x->x_delsamps < x->x_n) x->x_delsamps = x->x_n;
......
......@@ -57,7 +57,7 @@ union tabfudge
};
/* -------------------------- phasor~ ------------------------------ */
static t_class *phasor_class, *scalarphasor_class;
static t_class *phasor_class;
#if 1 /* in the style of R. Hoeldrich (ICMC 1995 Banff) */
......@@ -237,7 +237,7 @@ static void cos_setup(void)
/* ------------------------ osc~ ----------------------------- */
static t_class *osc_class, *scalarosc_class;
static t_class *osc_class;
typedef struct _osc
{
......
......@@ -237,10 +237,8 @@ int alsa_open_audio(int naudioindev, int *audioindev, int nchindev,
{
int err, inchans = 0, outchans = 0, subunitdir;
char devname[512];
snd_output_t* out;
int frag_size = (sys_blocksize ? sys_blocksize : ALSA_DEFFRAGSIZE);
int nfrags, i, iodev, dev2;
int wantinchans, wantoutchans, device;
nfrags = sys_schedadvance * (float)rate / (1e6 * frag_size);
/* save our belief as to ALSA's buffer size for later */
......@@ -394,8 +392,8 @@ int alsa_send_dacs(void)
#endif
static double timenow;
double timelast;
t_sample *fp, *fp1, *fp2;
int i, j, k, err, iodev, result, ch;
t_sample *fp1, *fp2;
int i, j, k, iodev, result, ch;
int chansintogo, chansouttogo;
unsigned int transfersize;
......@@ -611,7 +609,7 @@ int alsa_send_dacs(void)
void alsa_printstate( void)
{
int i, result, iodev = 0;
int result, iodev = 0;
snd_pcm_sframes_t indelay, outdelay;
if (sys_audioapi != API_ALSA)
{
......@@ -695,7 +693,7 @@ void alsa_getzeros(int iodev, int n)
/* call this only if both input and output are open */
static void alsa_checkiosync( void)
{
int i, result, giveup = 1000, alreadylogged = 0, iodev = 0;
int result, giveup = 1000, alreadylogged = 0, iodev = 0;
snd_pcm_sframes_t minphase, maxphase, thisphase, outdelay;
while (1)
......
......@@ -41,9 +41,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) */
/* our device handles */
......@@ -70,7 +67,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. */
......@@ -123,9 +119,8 @@ int oss_reset(int fd) {
void oss_configure(t_oss_dev *dev, int srate, int dac, int skipblocksize)
{
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;
......@@ -239,7 +234,7 @@ static int oss_setchannels(int fd, int wantchannels, char *devname)
}
}
param = wantchannels;
whynot:
//whynot:
while (param > 1)
{
int save = param;
......@@ -263,11 +258,8 @@ 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 */
for (i = 0; i < OSS_MAXDEV; i++)
......@@ -541,7 +533,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;
......@@ -620,11 +612,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;
......@@ -665,7 +655,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;
......
......@@ -89,7 +89,7 @@ void class_set_extern_dir(t_symbol *s);
static int sys_do_load_lib(t_canvas *canvas, char *objectname)
{
char symname[MAXPDSTRING], filename[FILENAME_MAX], dirbuf[FILENAME_MAX],
*classname, *nameptr, altsymname[MAXPDSTRING];
*classname, *nameptr;
void *dlobj;
t_xxx makeout = NULL;
int i, hexmunge = 0, fd;
......
......@@ -82,7 +82,6 @@ static void sys_path_replace(
) {
size_t const replen = strlen(replacement);
size_t const patlen = strlen(pattern);
size_t const orilen = strlen(original);
size_t patcnt = 0;
const char * oriptr;
......@@ -96,8 +95,6 @@ static void sys_path_replace(
{
// allocate memory for the new string
size_t const retlen = orilen + patcnt * (replen - patlen);
if (returned != NULL)
{
// copy the original string,
......@@ -253,7 +250,7 @@ t_namelist *namelist_append_files(t_namelist *listwas, const char *s)
{
const char *npos;
char temp[MAXPDSTRING];
t_namelist *nl = listwas, *rtn = listwas;
t_namelist *nl = listwas;
npos = s;
do
......@@ -519,10 +516,8 @@ int sys_rcfile(void)
{
FILE* file;
int i;
int k;
int rcargc;
char* rcargv[NUMARGS];
char* buffer;
char fname[FILENAME_MAX], buf[1000], *home = getenv("HOME");
int retval = 1; /* that's what we will return at the end; for now, let's think it'll be an error */
......
......@@ -92,8 +92,6 @@ int
Tcl_AppInit(interp)
Tcl_Interp *interp; /* Interpreter for application. */
{
Tk_Window mainwindow;
if (Tcl_Init(interp) == TCL_ERROR) {
return TCL_ERROR;
}
......
......@@ -355,11 +355,9 @@ static void pd_startfromgui( void)
char cmdbuf[1000], pdbuf[1000], *lastchar;
const char *arg0;
struct sockaddr_in server;
int msgsock;
int len = sizeof(server), nchar;
int len = sizeof(server);
int ntry = 0, portno = FIRSTPORTNUM;
int xsock = -1;
char morebuf[256];
#ifdef MSW
short version = MAKEWORD(2, 0);
WSADATA nobby;
......
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