diff --git a/extra/pd~/pd~.c b/extra/pd~/pd~.c index 49b398b307d87b31e36dad5affc672fa6c2dfa71..3cf713feb16b1ca44270c63b5de86a8ad00c32ec 100644 --- a/extra/pd~/pd~.c +++ b/extra/pd~/pd~.c @@ -177,11 +177,15 @@ static void pd_tilde_donew(t_pd_tilde *x, char *pddir, char *schedlibdir, snprintf(pdexecbuf, MAXPDSTRING, "%s/bin/pd", pddir); if (stat(pdexecbuf, &statbuf) < 0) { - snprintf(pdexecbuf, MAXPDSTRING, "%s/pd", pddir); + snprintf(pdexecbuf, MAXPDSTRING, "%s/../../../bin/pd", pddir); if (stat(pdexecbuf, &statbuf) < 0) { - ERROR "pd~: can't stat %s", pdexecbuf); - goto fail1; + snprintf(pdexecbuf, MAXPDSTRING, "%s/pd", pddir); + if (stat(pdexecbuf, &statbuf) < 0) + { + ERROR "pd~: can't stat %s", pdexecbuf); + goto fail1; + } } } snprintf(schedbuf, MAXPDSTRING, "%s/pdsched%s", schedlibdir, diff --git a/src/CHANGELOG.txt b/src/CHANGELOG.txt index 6d7891713967b613e589ce5c7c2d245ff3e47a3f..c376ff43423c852fb251d0a23cb69559186667c8 100644 --- a/src/CHANGELOG.txt +++ b/src/CHANGELOG.txt @@ -1,6 +1,6 @@ This file describes implementation and API changes; stuff more visible to the user appears in the "release notes" instead. See the bottom of this file -for original notes on source stype and organization. +for original notes on source style and organization. 0.42.0 diff --git a/src/notes.txt b/src/notes.txt index a64e02dc31f956d7f5b2779e781c943f2baabced..4a7c25102bc0b14aa9f1c3872117d22c8095da4b 100644 --- a/src/notes.txt +++ b/src/notes.txt @@ -1,5 +1,5 @@ ---------------- dolist -------------------- -done: +reproduce canvas complaint: find "s scatsinger" & move any box... test: compile on various versions of linux @@ -29,7 +29,6 @@ look again at array vis/invis conundrum, g_template.c TK commands to nonexistent windows? (occasionally still happens) still can't detect when a window is moved or resized open_via_path call in d_soundfile.c isn't threadsafe -crashed Pd putting vec and template in wrong order in array element of struct floor, ciel functions in expr misdeclared graph names don't appear until graph moved? (invis/vis on new array/rename) don't filter locked click() through getrect diff --git a/src/s_audio.c b/src/s_audio.c index 9f4e20513d6fb9aec15ef9bc697f8173e30732cc..81438bbedd33f63009bb8285d95e8d2a7736de83 100644 --- a/src/s_audio.c +++ b/src/s_audio.c @@ -175,7 +175,7 @@ void sys_setchsr(int chin, int chout, int sr) /* set audio device settings (after cleaning up the specified device and channel vectors). The audio devices are "zero based" (i.e. "0" means the - first one.) We can later re-open audio and/or show the settings on a\ + first one.) We can later re-open audio and/or show the settings on a dialog window. */ void sys_set_audio_settings(int naudioindev, int *audioindev, int nchindev, diff --git a/src/s_audio_oss.c b/src/s_audio_oss.c index 2649d4e1a7731389da4e81449e053091813f13b8..73f916ce2f6f1fb78bdc7f662f3dadc87bb8fede 100644 --- a/src/s_audio_oss.c +++ b/src/s_audio_oss.c @@ -70,7 +70,6 @@ t_sample *sys_soundin; /* OSS-specific private variables */ static int oss_blockmode = 1; /* flag to use "blockmode" */ -static int oss_32bit = 0; /* allow 23 bit transfers in OSS */ static char ossdsp[] = "/dev/dsp%d"; /* don't assume we can turn all 31 bits when doing float-to-fix; @@ -109,12 +108,6 @@ void oss_init(void) countedthem = 1; } -void oss_set32bit( void) -{ - oss_32bit = 1; -} - - typedef struct _multidev { int fd; int channels; @@ -128,15 +121,6 @@ int oss_reset(int fd) { return err; } - /* The AFMT_S32_BLOCKED format is not defined in standard linux kernels - but is proposed by Guenter Geiger to support extending OSS to handle - 32 bit sample. This is user in Geiger's OSS driver for RME Hammerfall. - I'm not clear why this isn't called AFMT_S32_[SLN]E... */ - -#ifndef AFMT_S32_BLOCKED -#define AFMT_S32_BLOCKED 0x0000400 -#endif - void oss_configure(t_oss_dev *dev, int srate, int dac, int skipblocksize) { int orig, param, nblk, fd = dev->d_fd, wantformat; @@ -145,22 +129,12 @@ void oss_configure(t_oss_dev *dev, int srate, int dac, int skipblocksize) audio_buf_info ainfo; - /* set resolution - first try 4 byte samples */ - if (oss_32bit && (ioctl(fd,SNDCTL_DSP_GETFMTS,¶m) >= 0) && - (param & AFMT_S32_BLOCKED)) - { - wantformat = AFMT_S32_BLOCKED; - dev->d_bytespersamp = 4; - } - else - { - wantformat = AFMT_S16_NE; - dev->d_bytespersamp = 2; - } + /* we only know how to do 2 byte samples */ + wantformat = AFMT_S16_NE; + dev->d_bytespersamp = 2; + param = wantformat; - if (sys_verbose) - post("bytes per sample = %d", dev->d_bytespersamp); if (ioctl(fd, SNDCTL_DSP_SETFMT, ¶m) == -1) fprintf(stderr,"OSS: Could not set DSP format\n"); else if (wantformat != param) @@ -740,18 +714,7 @@ int oss_send_dacs(void) linux_dacs[dev].d_dropcount--; else { - if (linux_dacs[dev].d_bytespersamp == 4) - { - for (i = DEFDACBLKSIZE * nchannels, fp1 = sys_soundout + - DEFDACBLKSIZE*thischan, - lp = (t_oss_int32 *)buf; i--; fp1++, lp++) - { - float f = *fp1 * 2147483648.; - *lp = (f >= 2147483647. ? 2147483647. : - (f < -2147483648. ? -2147483648. : f)); - } - } - else + if (linux_dacs[dev].d_bytespersamp == 2) { for (i = DEFDACBLKSIZE, fp1 = sys_soundout + DEFDACBLKSIZE*thischan, @@ -798,16 +761,7 @@ int oss_send_dacs(void) } timeref = timenow; - if (linux_adcs[dev].d_bytespersamp == 4) - { - for (i = DEFDACBLKSIZE*nchannels, - fp1 = sys_soundin + thischan*DEFDACBLKSIZE, - lp = (t_oss_int32 *)buf; i--; fp1++, lp++) - { - *fp1 = ((float)(*lp))*(float)(1./2147483648.); - } - } - else + if (linux_adcs[dev].d_bytespersamp == 2) { for (i = DEFDACBLKSIZE,fp1 = sys_soundin + thischan*DEFDACBLKSIZE, sp = (t_oss_int16 *)buf; i--; fp1++, sp += nchannels) diff --git a/src/s_main.c b/src/s_main.c index cb4bf7afabdfcb5dc540645a3d86e129bd2095de..8e9cb08ddd7ce780648651684f797931b87bab92 100644 --- a/src/s_main.c +++ b/src/s_main.c @@ -333,7 +333,6 @@ static char *(usagemessage[]) = { #ifdef USEAPI_OSS "-oss -- use OSS audio API\n", -"-32bit ----- allow 32 bit OSS audio (for RME Hammerfall)\n", #endif #ifdef USEAPI_ALSA @@ -619,12 +618,6 @@ int sys_argparse(int argc, char **argv) sys_set_audio_api(API_OSS); argc--; argv++; } - else if (!strcmp(*argv, "-32bit")) - { - sys_set_audio_api(API_OSS); - oss_set32bit(); - argc--; argv++; - } #endif #ifdef USEAPI_ALSA else if (!strcmp(*argv, "-alsa")) diff --git a/src/s_stuff.h b/src/s_stuff.h index 4af5c7543bcc8ac2489b72db180e4353af51df5b..f85fb6cb05b6e88120e660dd890fd37ddd34d26e 100644 --- a/src/s_stuff.h +++ b/src/s_stuff.h @@ -49,7 +49,7 @@ EXTERN int sys_hostfontsize(int fontsize); extern int sys_defaultfont; extern t_symbol *sys_libdir; /* library directory for auxilliary files */ -extern t_symbol *sys_guidir; /* directory holding pd_gui (also pd, u_pdsend, etc) */ +extern t_symbol *sys_guidir; /* directory holding pd_gui, u_pdsend, etc */ /* s_loader.c */ int sys_load_lib(t_canvas *canvas, char *filename);