Commit 05b4b22c authored by Miller Puckette's avatar Miller Puckette
Browse files

loads more patches

parent e2407c2d
#N canvas 482 81 568 339 10;
#X obj 1 1 cnv 15 300 60 foo10_snd foo10_rcv my_canvas=cnv 63 37 192
#N canvas 0 22 500 292 10;
#X obj 1 1 cnv 15 300 60 foo10_snd foo10_rcv my_canvas=cnv 63 37 0
17 -257472 -355 0;
#X text 4 232 (c) musil@iem.kug.ac.at;
#X text 46 245 IEM KUG;
#N canvas 219 100 699 530 edit 0;
#X obj 39 226 f;
#X msg 17 205 bang;
#X floatatom 55 204 3 63 88;
#X floatatom 90 226 3 0 37;
#X floatatom 55 204 3 63 88 0 - - -;
#X floatatom 90 226 3 0 37 0 - - -;
#X obj 39 249 pack 0 0;
#X text 117 226 y-label;
#X text 83 204 x-label;
#X obj 297 281 f;
#X msg 275 260 bang;
#X floatatom 313 259 3 -10 10;
#X floatatom 348 281 3 -10 10;
#X floatatom 313 259 3 -10 10 0 - - -;
#X floatatom 348 281 3 -10 10 0 - - -;
#X obj 297 304 pack 0 0;
#X obj 309 396 f;
#X msg 287 375 bang;
#X floatatom 325 374 3 20 60;
#X floatatom 360 396 3 150 200;
#X floatatom 325 374 3 20 60 0 - - -;
#X floatatom 360 396 3 150 200 0 - - -;
#X obj 309 419 pack 0 0;
#X text 341 259 x-delta;
#X text 375 281 y-delta;
......@@ -27,12 +27,12 @@
#X text 387 396 y-position;
#X obj 59 341 f;
#X msg 37 320 bang;
#X floatatom 75 319 3 0 2;
#X floatatom 110 341 3 4 36;
#X floatatom 75 319 3 0 2 0 - - -;
#X floatatom 110 341 3 4 36 0 - - -;
#X obj 59 364 pack 0 0;
#X text 103 319 font;
#X text 139 341 height;
#X floatatom 275 183 3 2 20;
#X floatatom 275 183 3 2 20 0 - - -;
#X msg 52 137 \; foo10_rcv color \$1 \$2;
#X msg 39 274 \; foo10_rcv label_pos \$1 \$2;
#X msg 59 390 \; foo10_rcv label_font \$1 \$2;
......@@ -42,8 +42,8 @@
#X msg 297 329 \; foo10_rcv delta \$1 \$2;
#X obj 505 234 f;
#X msg 483 213 bang;
#X floatatom 521 212 5 100 1000;
#X floatatom 556 234 4 50 500;
#X floatatom 521 212 5 100 1000 0 - - -;
#X floatatom 556 234 4 50 500 0 - - -;
#X obj 505 257 pack 0 0;
#X text 566 212 width;
#X text 594 236 height;
......@@ -57,14 +57,14 @@
#X msg 509 372 \; foo10_rcv get_pos;
#X obj 510 407 r foo10_snd;
#X obj 510 428 unpack 0 0;
#X floatatom 510 453 4 0 0;
#X floatatom 575 452 4 0 0;
#X floatatom 510 453 4 0 0 0 - - -;
#X floatatom 575 452 4 0 0 0 - - -;
#X text 490 452 x=;
#X text 557 452 y=;
#X obj 52 79 f;
#X msg 29 31 bang;
#X floatatom 68 29 3 0 29;
#X floatatom 103 47 3 0 29;
#X floatatom 68 29 3 0 29 0 - - -;
#X floatatom 103 47 3 0 29 0 - - -;
#X text 96 29 background;
#X text 131 48 label-color;
#X msg 290 25 back;
......@@ -137,9 +137,9 @@
#X connect 30 1 23 0;
#X connect 30 2 28 0;
#X restore 290 86 pd RGB_____________;
#X floatatom 332 55 3 0 255;
#X floatatom 375 55 3 0 255;
#X floatatom 418 56 3 0 255;
#X floatatom 332 55 3 0 255 0 - - -;
#X floatatom 375 55 3 0 255 0 - - -;
#X floatatom 418 56 3 0 255 0 - - -;
#X text 39 3 preset-colors;
#X text 301 0 RGB-colors;
#X text 332 37 red;
......@@ -188,22 +188,22 @@
#X connect 68 0 66 2;
#X connect 69 0 66 3;
#X connect 75 0 29 0;
#X restore 305 20 pd edit;
#X floatatom 110 193 4 0 0;
#X floatatom 147 193 4 0 0;
#X restore 315 20 pd edit;
#X floatatom 110 193 4 0 0 0 - - -;
#X floatatom 147 193 4 0 0 0 - - -;
#X text 121 209 x;
#X text 158 209 y;
#X obj 7 161 metro 100;
#X obj 33 141 tgl 15 1 empty empty empty 20 8 0 10 -262144 -1 -1 1
1;
#X obj 110 145 r from_K1;
#X floatatom 188 194 4 0 0;
#X floatatom 225 194 4 0 0;
#X floatatom 188 194 4 0 0 0 - - -;
#X floatatom 225 194 4 0 0 0 - - -;
#X text 198 210 x;
#X text 236 210 y;
#X obj 188 146 r from_K2;
#X msg 7 185 \; to_K get_pos;
#N canvas 0 296 395 395 room 1;
#N canvas 0 296 395 395 room 0;
#X obj 1 1 cnv 1 400 400 empty empty type...ctrl+e 150 140 2 17 -33289
-24198 0;
#X obj 15 16 cnv 1 1 360 empty empty move_K1_and_K2 115 160 2 17 -166441
......@@ -214,9 +214,9 @@
0;
#X obj 17 375 cnv 1 358 1 empty empty empty 20 12 2 20 -99865 -66577
0;
#X obj 23 22 cnv 25 25 25 from_K1 to_K K1 1 13 194 14 -261681 -123526
#X obj 23 22 cnv 25 25 25 from_K1 to_K K1 1 13 2 14 -261681 -123526
0;
#X obj 342 342 cnv 25 25 25 from_K2 to_K K2 1 13 194 14 -225280 -1109
#X obj 342 342 cnv 25 25 25 from_K2 to_K K2 1 13 2 14 -225280 -1109
0;
#X restore 307 147 pd room;
#X obj 110 169 unpack;
......@@ -229,9 +229,26 @@
#X text 5 64 click the properties-dialog on the top-left corner;
#X obj 361 195 r foo10_rcv;
#X obj 403 215 s ggg;
#X text 172 257 updated for Pd version 0.35;
#X text 21 257 graz \, austria 2002;
#X obj 187 236 x_all_guis aaa bbb ccc ddd eee fff ggg hhh iii;
#X text 313 46 For cnv's creation arguments:;
#N canvas 881 440 467 369 canvas-creation-arguments 0;
#X msg 7 12 canvas: cnv selectableSize xSize ySize sendName recieveName
Label labelXOff labelYOff Font# fontSize bgColor lblColor 0;
#X text 9 169 For example \, a canvas called thusly:;
#X obj 9 248 cnv 15 200 100 myCanvas myCanvasR Canvas_Demo 20 12 2
14 -62784 -195568 0;
#X text 9 226 will result in this:;
#X text 8 59 Canvas can be called with 13 creation arguments. These
are not "optional" - all parameters must be filled or the canvas will
not instantiate correctly.;
#X text 10 114 The function of the final "0" is unknown to me (it is
found in the textual entry for a canvas object in a .pd file) but can
be safely left off without ill effects.;
#X msg 9 191 cnv 15 200 100 myCanvas myCanvasR Canvas_Demo 20 12 2
14 18 20;
#X restore 314 63 pd canvas-creation-arguments;
#X text 172 257 updated for Pd version 0.35;
#X connect 8 0 16 0;
#X connect 9 0 8 0;
#X connect 10 0 18 0;
......
......@@ -91,7 +91,7 @@ of a note at or near the previously output pitch.;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X restore 330 531 pd setting-parameters;
#N canvas 149 65 641 815 sinusoid-tracking 1;
#N canvas 149 65 641 815 sinusoid-tracking 0;
#X obj 124 267 sigmund~ -npeak 10 peaks;
#X obj 124 214 phasor~;
#X obj 124 144 loadbang;
......@@ -127,7 +127,7 @@ claw them apart). The other four are as shown:;
#X floatatom 245 760 5 0 0 0 - - -;
#X floatatom 285 737 5 0 0 0 - - -;
#X floatatom 326 713 5 0 0 0 - - -;
#X obj 246 638 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
#X obj 246 638 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X text 43 535 If you ask for "tracks" \, the output is four numbers:
index \, frequency \, and amplitude as before \, and finally a flag
......
......@@ -4,7 +4,10 @@ for original notes on source stype and organization.
0.41.0
add support for callback-based audio I/O; changes in
add support for callback-based audio I/O
headers & code changed to use t_float or t_sample instead of float (patches
by zmoelnig).
0.40.0
......
......@@ -7,6 +7,7 @@ AC_SUBST(portaudio, no)
AC_SUBST(portmidi, no)
AC_SUBST(binarymode, -m755)
AC_SUBST(fftw, no)
AC_SUBST(tk, yes)
AC_SUBST(PDLIB)
AC_SUBST(CPPFLAGS)
AC_SUBST(MORECFLAGS)
......@@ -21,6 +22,7 @@ AC_SUBST(GUIFLAGS)
AC_SUBST(OSNUMBER)
AC_SUBST(EXTERNTARGET)
AC_SUBST(ASIOSRC)
AC_SUBST(GUISRC)
dnl other defaults
......@@ -42,8 +44,10 @@ AC_ARG_ENABLE(setuid, [ --enable-setuid install as setuid (linux)],
setuid=$enableval)
AC_ARG_ENABLE(fftw, [ --enable-fftw use FFTW package],
fftw=$enableval)
AC_ARG_ENABLE(fat, [ --disable-fat build fat binary on Mac OS X],
AC_ARG_ENABLE(fat, [ --disable-fat build fat binary on Mac OS X],
fat=$enableval, fat="yes")
AC_ARG_ENABLE(tk, [ --disable-tk build without tcl/tk-GUI],
tk=$enableval)
dnl Checks for programs.
AC_PROG_CC
......@@ -97,6 +101,10 @@ fi
dnl look for tcl 8.x... do I really have to go through all this!?
if test x$tk != "xno"; then
GUISRC="t_main.c t_tkcmd.c"
fi
foundit=no
if test $foundit = "no";
then
......
......@@ -425,13 +425,81 @@ int open_soundfile_via_canvas(t_canvas *canvas, const char *filename, int header
p_bigendian, p_nchannels, p_bytelimit, skipframes));
}
static void soundfile_xferin(int sfchannels, int nvecs, float **vecs,
static void soundfile_xferin_sample(int sfchannels, int nvecs, t_sample **vecs,
long itemsread, unsigned char *buf, int nitems, int bytespersamp,
int bigendian, int spread)
{
int i, j;
unsigned char *sp, *sp2;
float *fp;
t_sample *fp;
int nchannels = (sfchannels < nvecs ? sfchannels : nvecs);
int bytesperframe = bytespersamp * sfchannels;
for (i = 0, sp = buf; i < nchannels; i++, sp += bytespersamp)
{
if (bytespersamp == 2)
{
if (bigendian)
{
for (j = 0, sp2 = sp, fp=vecs[i] + spread * itemsread;
j < nitems; j++, sp2 += bytesperframe, fp += spread)
*fp = SCALE * ((sp2[0] << 24) | (sp2[1] << 16));
}
else
{
for (j = 0, sp2 = sp, fp=vecs[i] + spread * itemsread;
j < nitems; j++, sp2 += bytesperframe, fp += spread)
*fp = SCALE * ((sp2[1] << 24) | (sp2[0] << 16));
}
}
else if (bytespersamp == 3)
{
if (bigendian)
{
for (j = 0, sp2 = sp, fp=vecs[i] + spread * itemsread;
j < nitems; j++, sp2 += bytesperframe, fp += spread)
*fp = SCALE * ((sp2[0] << 24) | (sp2[1] << 16)
| (sp2[2] << 8));
}
else
{
for (j = 0, sp2 = sp, fp=vecs[i] + spread * itemsread;
j < nitems; j++, sp2 += bytesperframe, fp += spread)
*fp = SCALE * ((sp2[2] << 24) | (sp2[1] << 16)
| (sp2[0] << 8));
}
}
else if (bytespersamp == 4)
{
if (bigendian)
{
for (j = 0, sp2 = sp, fp=vecs[i] + spread * itemsread;
j < nitems; j++, sp2 += bytesperframe, fp += spread)
*(long *)fp = ((sp2[0] << 24) | (sp2[1] << 16)
| (sp2[2] << 8) | sp2[3]);
}
else
{
for (j = 0, sp2 = sp, fp=vecs[i] + spread * itemsread;
j < nitems; j++, sp2 += bytesperframe, fp += spread)
*(long *)fp = ((sp2[3] << 24) | (sp2[2] << 16)
| (sp2[1] << 8) | sp2[0]);
}
}
}
/* zero out other outputs */
for (i = sfchannels; i < nvecs; i++)
for (j = nitems, fp = vecs[i]; j--; )
*fp++ = 0;
}
static void soundfile_xferin_float(int sfchannels, int nvecs, t_float **vecs,
long itemsread, unsigned char *buf, int nitems, int bytespersamp,
int bigendian, int spread)
{
int i, j;
unsigned char *sp, *sp2;
t_float *fp;
int nchannels = (sfchannels < nvecs ? sfchannels : nvecs);
int bytesperframe = bytespersamp * sfchannels;
for (i = 0, sp = buf; i < nchannels; i++, sp += bytespersamp)
......@@ -518,7 +586,7 @@ static void soundfile_xferin(int sfchannels, int nvecs, float **vecs,
static int soundfiler_writeargparse(void *obj, int *p_argc, t_atom **p_argv,
t_symbol **p_filesym,
int *p_filetype, int *p_bytespersamp, int *p_swap, int *p_bigendian,
int *p_normalize, long *p_onset, long *p_nframes, float *p_rate)
int *p_normalize, long *p_onset, long *p_nframes, t_float *p_rate)
{
int argc = *p_argc;
t_atom *argv = *p_argv;
......@@ -526,7 +594,7 @@ static int soundfiler_writeargparse(void *obj, int *p_argc, t_atom **p_argv,
endianness = -1, swap, filetype = -1, normalize = 0;
long onset = 0, nframes = 0x7fffffff;
t_symbol *filesym;
float rate = -1;
t_float rate = -1;
while (argc > 0 && argv->a_type == A_SYMBOL &&
*argv->a_w.w_symbol->s_name == '-')
......@@ -668,7 +736,7 @@ usage:
static int create_soundfile(t_canvas *canvas, const char *filename,
int filetype, int nframes, int bytespersamp,
int bigendian, int nchannels, int swap, float samplerate)
int bigendian, int nchannels, int swap, t_float samplerate)
{
char filenamebuf[MAXPDSTRING], buf2[MAXPDSTRING];
char headerbuf[WRITEHDRSIZE];
......@@ -827,20 +895,20 @@ baddonewrite:
post("%s: %s", filename, strerror(errno));
}
static void soundfile_xferout(int nchannels, float **vecs,
static void soundfile_xferout_sample(int nchannels, t_sample **vecs,
unsigned char *buf, int nitems, long onset, int bytespersamp,
int bigendian, float normalfactor, int spread)
int bigendian, t_sample normalfactor, int spread)
{
int i, j;
unsigned char *sp, *sp2;
float *fp;
t_sample *fp;
int bytesperframe = bytespersamp * nchannels;
long xx;
for (i = 0, sp = buf; i < nchannels; i++, sp += bytespersamp)
{
if (bytespersamp == 2)
{
float ff = normalfactor * 32768.;
t_sample ff = normalfactor * 32768.;
if (bigendian)
{
for (j = 0, sp2 = sp, fp = vecs[i] + onset;
......@@ -874,7 +942,7 @@ static void soundfile_xferout(int nchannels, float **vecs,
}
else if (bytespersamp == 3)
{
float ff = normalfactor * 8388608.;
t_sample ff = normalfactor * 8388608.;
if (bigendian)
{
for (j = 0, sp2 = sp, fp=vecs[i] + onset;
......@@ -915,7 +983,7 @@ static void soundfile_xferout(int nchannels, float **vecs,
for (j = 0, sp2 = sp, fp=vecs[i] + onset;
j < nitems; j++, sp2 += bytesperframe, fp += spread)
{
float f2 = *fp * normalfactor;
t_sample f2 = *fp * normalfactor;
xx = *(long *)&f2;
sp2[0] = (xx >> 24); sp2[1] = (xx >> 16);
sp2[2] = (xx >> 8); sp2[3] = xx;
......@@ -926,7 +994,115 @@ static void soundfile_xferout(int nchannels, float **vecs,
for (j = 0, sp2 = sp, fp=vecs[i] + onset;
j < nitems; j++, sp2 += bytesperframe, fp += spread)
{
float f2 = *fp * normalfactor;
t_sample f2 = *fp * normalfactor;
xx = *(long *)&f2;
sp2[3] = (xx >> 24); sp2[2] = (xx >> 16);
sp2[1] = (xx >> 8); sp2[0] = xx;
}
}
}
}
}
static void soundfile_xferout_float(int nchannels, t_float **vecs,
unsigned char *buf, int nitems, long onset, int bytespersamp,
int bigendian, t_sample normalfactor, int spread)
{
int i, j;
unsigned char *sp, *sp2;
t_float *fp;
int bytesperframe = bytespersamp * nchannels;
long xx;
for (i = 0, sp = buf; i < nchannels; i++, sp += bytespersamp)
{
if (bytespersamp == 2)
{
t_sample ff = normalfactor * 32768.;
if (bigendian)
{
for (j = 0, sp2 = sp, fp = vecs[i] + onset;
j < nitems; j++, sp2 += bytesperframe, fp += spread)
{
int xx = 32768. + (*fp * ff);
xx -= 32768;
if (xx < -32767)
xx = -32767;
if (xx > 32767)
xx = 32767;
sp2[0] = (xx >> 8);
sp2[1] = xx;
}
}
else
{
for (j = 0, sp2 = sp, fp=vecs[i] + onset;
j < nitems; j++, sp2 += bytesperframe, fp += spread)
{
int xx = 32768. + (*fp * ff);
xx -= 32768;
if (xx < -32767)
xx = -32767;
if (xx > 32767)
xx = 32767;
sp2[1] = (xx >> 8);
sp2[0] = xx;
}
}
}
else if (bytespersamp == 3)
{
t_sample ff = normalfactor * 8388608.;
if (bigendian)
{
for (j = 0, sp2 = sp, fp=vecs[i] + onset;
j < nitems; j++, sp2 += bytesperframe, fp += spread)
{
int xx = 8388608. + (*fp * ff);
xx -= 8388608;
if (xx < -8388607)
xx = -8388607;
if (xx > 8388607)
xx = 8388607;
sp2[0] = (xx >> 16);
sp2[1] = (xx >> 8);
sp2[2] = xx;
}
}
else
{
for (j = 0, sp2 = sp, fp=vecs[i] + onset;
j < nitems; j++, sp2 += bytesperframe, fp += spread)
{
int xx = 8388608. + (*fp * ff);
xx -= 8388608;
if (xx < -8388607)
xx = -8388607;
if (xx > 8388607)
xx = 8388607;
sp2[2] = (xx >> 16);
sp2[1] = (xx >> 8);
sp2[0] = xx;
}
}
}
else if (bytespersamp == 4)
{
if (bigendian)
{
for (j = 0, sp2 = sp, fp=vecs[i] + onset;
j < nitems; j++, sp2 += bytesperframe, fp += spread)
{
t_sample f2 = *fp * normalfactor;
xx = *(long *)&f2;
sp2[0] = (xx >> 24); sp2[1] = (xx >> 16);
sp2[2] = (xx >> 8); sp2[3] = xx;
}
}
else
{
for (j = 0, sp2 = sp, fp=vecs[i] + onset;
j < nitems; j++, sp2 += bytesperframe, fp += spread)
{
t_sample f2 = *fp * normalfactor;
xx = *(long *)&f2;
sp2[3] = (xx >> 24); sp2[2] = (xx >> 16);
sp2[1] = (xx >> 8); sp2[0] = xx;
......@@ -935,7 +1111,6 @@ static void soundfile_xferout(int nchannels, float **vecs,
}
}
}
/* ------- soundfiler - reads and writes soundfiles to/from "garrays" ---- */
#define DEFMAXSIZE 4000000 /* default maximum 16 MB per channel */
......@@ -1121,9 +1296,9 @@ static void soundfiler_read(t_soundfiler *x, t_symbol *s,
thisread = (thisread > bufframes ? bufframes : thisread);
nitems = fread(sampbuf, channels * bytespersamp, thisread, fp);
if (nitems <= 0) break;
soundfile_xferin(channels, argc, (float **)vecs, itemsread,
soundfile_xferin_float(channels, argc, (t_float **)vecs, itemsread,
(unsigned char *)sampbuf, nitems, bytespersamp, bigendian,
sizeof(t_word)/sizeof(float));
sizeof(t_word)/sizeof(t_sample));
itemsread += nitems;
}
/* zero out remaining elements of vectors */
......@@ -1157,7 +1332,7 @@ usage:
done:
if (fd >= 0)
close (fd);
outlet_float(x->x_obj.ob_outlet, (float)itemsread);
outlet_float(x->x_obj.ob_outlet, (t_float)itemsread);
}
/* this is broken out from soundfiler_write below so garray_write can
......@@ -1175,7 +1350,8 @@ long soundfiler_dowrite(void *obj, t_canvas *canvas,
char sampbuf[SAMPBUFSIZE];
int bufframes, nitems;
int fd = -1;
float normfactor, biggest = 0, samplerate;
t_sample normfactor, biggest = 0;
t_float samplerate;
t_symbol *filesym;
if (soundfiler_writeargparse(obj, &argc, &argv, &filesym, &filetype,
......@@ -1244,9 +1420,9 @@ long soundfiler_dowrite(void *obj, t_canvas *canvas,
{
int thiswrite = nframes - itemswritten, nitems, nbytes;
thiswrite = (thiswrite > bufframes ? bufframes : thiswrite);
soundfile_xferout(argc, (t_float **)vecs, (unsigned char *)sampbuf,
soundfile_xferout_float(argc, (t_float **)vecs, (unsigned char *)sampbuf,
thiswrite, onset, bytespersamp, bigendian, normfactor,
sizeof(t_word)/sizeof(float));
sizeof(t_word)/sizeof(t_sample));
nbytes = write(fd, sampbuf, nchannels * bytespersamp * thiswrite);
if (nbytes < nchannels * bytespersamp * thiswrite)
{
......@@ -1281,7 +1457,7 @@ static void soundfiler_write(t_soundfiler *x, t_symbol *s,
{
long bozo = soundfiler_dowrite(x, x->x_canvas,
argc, argv);
outlet_float(x->x_obj.ob_outlet, (float)bozo);
outlet_float(x->x_obj.ob_outlet, (t_float)bozo);
}
static void soundfiler_setup(void)
......@@ -1343,7 +1519,7 @@ typedef struct _readsf
int x_vecsize; /* vector size for transfers */
t_outlet *x_bangout; /* bang-on-done outlet */
int x_state; /* opened, running, or idle */
float x_insamplerate; /* sample rate of input signal if known */
t_float x_insamplerate; /* sample rate of input signal if known */
/* parameters to communicate with subthread */
int x_requestcode; /* pending request from parent to I/O thread */
char *x_filename; /* file to open (string is permanently allocated) */
......@@ -1352,7 +1528,7 @@ typedef struct _readsf
int x_bytespersample; /* bytes per sample (2 or 3) */
int x_bigendian; /* true if file is big-endian */
int x_sfchannels; /* number of channels in soundfile */
float x_samplerate; /* sample rate of soundfile */
t_float x_samplerate; /* sample rate of soundfile */
long x_onsetframes; /* number of sample frames to skip */
long x_bytelimit; /* max number of data bytes to read */
int x_fd; /* filedesc */
......@@ -1365,7 +1541,7 @@ typedef struct _readsf
int x_filetype; /* writesf~ only; type of file to create */
int x_itemswritten; /* writesf~ only; items writen */
int x_swap; /* writesf~ only; true if byte swapping */
float x_f; /* writesf~ only; scalar for signal inlet */
t_float x_f; /* writesf~ only; scalar for signal inlet */
pthread_mutex_t x_mutex;
pthread_cond_t x_requestcondition;
pthread_cond_t x_answercondition;
......@@ -1744,7 +1920,7 @@ static t_int *readsf_perform(t_int *w)
int vecsize = x->x_vecsize, noutlets = x->x_noutlets, i, j,
bytespersample = x->x_bytespersample,
bigendian = x->x_bigendian;
float *fp;
t_sample *fp;
if (x->x_state == STATE_STREAM)
{
int wantbytes, nchannels, sfchannels = x->x_sfchannels;
......@@ -1788,7 +1964,7 @@ static t_int *readsf_perform(t_int *w)
(sfchannels * bytespersample);
if (xfersize)
{
soundfile_xferin(sfchannels, noutlets, x->x_outvec, 0,
soundfile_xferin_sample(sfchannels, noutlets, x->x_outvec, 0,
(unsigned char *)(x->x_buf + x->x_fifotail), xfersize,
bytespersample, bigendian, 1);
vecsize -= xfersize;
......@@ -1803,7 +1979,7 @@ static t_int *readsf_perform(t_int *w)
return (w+2);
}
soundfile_xferin(sfchannels, noutlets, x->x_outvec, 0,
soundfile_xferin_sample(sfchannels, noutlets, x->x_outvec, 0,
(unsigned char *)(x->x_buf + x->x_fifotail), vecsize,
bytespersample, bigendian, 1);
......@@ -1999,7 +2175,7 @@ static void *writesf_child_main(void *zz)
int filetype = x->x_filetype;
char *filename = x->x_filename;
t_canvas *canvas = x->x_canvas;
float samplerate = x->x_samplerate;
t_float samplerate = x->x_samplerate;
/* alter the request code so that an ensuing "open" will get
noticed. */
......@@ -2244,7 +2420,7 @@ static t_int *writesf_perform(t_int *w)
int vecsize = x->x_vecsize, sfchannels = x->x_sfchannels, i, j,
bytespersample = x->x_bytespersample,
bigendian = x->x_bigendian;
float *fp;
t_sample *fp;
if (x->x_state == STATE_STREAM)
{
int wantbytes;
......@@ -2263,7 +2439,7 @@ static t_int *writesf_perform(t_int *w)