diff --git a/pd/src/s_audio_mmio.c b/pd/src/s_audio_mmio.c index 6bb1f0877b304083aaf60f6d085463b7229b1b95..0ada2c23cc363d3cc98ce05866e01ef7a00873ba 100644 --- a/pd/src/s_audio_mmio.c +++ b/pd/src/s_audio_mmio.c @@ -32,12 +32,12 @@ int nt_realdacblksize; #define MAXBUFFER 100 /* number of buffers in use at maximum advance */ #define DEFBUFFER 30 /* default is about 30x6 = 180 msec! */ static int nt_naudiobuffer = DEFBUFFER; -float sys_dacsr = DEFAULTSRATE; +t_float sys_dacsr = DEFAULTSRATE; static int nt_whichapi = API_MMIO; static int nt_meters; /* true if we're metering */ -static float nt_inmax; /* max input amplitude */ -static float nt_outmax; /* max output amplitude */ +static t_float nt_inmax; /* max input amplitude */ +static t_float nt_outmax; /* max output amplitude */ static int nt_nwavein, nt_nwaveout; /* number of WAVE devices in and out */ typedef struct _sbuf @@ -489,7 +489,7 @@ void nt_logerror(int which) /* system buffer with t_sample types for one tick */ t_sample *sys_soundout; t_sample *sys_soundin; -float sys_dacsr; +t_float sys_dacsr; int mmio_send_dacs(void) { @@ -498,7 +498,7 @@ int mmio_send_dacs(void) HANDLE hFormat; int i, j; short *sp1, *sp2; - float *fp1, *fp2; + t_float *fp1, *fp2; int nextfill, doxfer = 0; int nda, nad; if (!nt_nwavein && !nt_nwaveout) return (0); @@ -507,11 +507,11 @@ int mmio_send_dacs(void) if (nt_meters) { int i, n; - float maxsamp; + t_float maxsamp; for (i = 0, n = 2 * nt_nwavein * DEFDACBLKSIZE, maxsamp = nt_inmax; i < n; i++) { - float f = sys_soundin[i]; + t_float f = sys_soundin[i]; if (f > maxsamp) maxsamp = f; else if (-f > maxsamp) maxsamp = -f; } @@ -519,7 +519,7 @@ int mmio_send_dacs(void) for (i = 0, n = 2 * nt_nwaveout * DEFDACBLKSIZE, maxsamp = nt_outmax; i < n; i++) { - float f = sys_soundout[i]; + t_float f = sys_soundout[i]; if (f > maxsamp) maxsamp = f; else if (-f > maxsamp) maxsamp = -f; } @@ -600,7 +600,7 @@ int mmio_send_dacs(void) for (j = 0, fp2 = fp1, sp2 = sp1; j < DEFDACBLKSIZE; j++, fp2++, sp2 += CHANNELS_PER_DEVICE) { - *fp2 = ((float)(1./32767.)) * (float)(*sp2); + *fp2 = ((t_float)(1./32767.)) * (t_float)(*sp2); } } }