[PD-cvs] pd/src d_soundfile.c, 1.4.4.11.2.10, 1.4.4.11.2.10.2.1 s_midi.c, 1.4.4.1.2.12.2.1, 1.4.4.1.2.12.2.2
Mathieu Bouchard
matju at users.sourceforge.net
Fri Dec 8 08:00:27 CET 2006
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26870
Modified Files:
Tag: desiredata
d_soundfile.c s_midi.c
Log Message:
0.40
Index: s_midi.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_midi.c,v
retrieving revision 1.4.4.1.2.12.2.1
retrieving revision 1.4.4.1.2.12.2.2
diff -C2 -d -r1.4.4.1.2.12.2.1 -r1.4.4.1.2.12.2.2
*** s_midi.c 8 Dec 2006 04:47:37 -0000 1.4.4.1.2.12.2.1
--- s_midi.c 8 Dec 2006 07:00:25 -0000 1.4.4.1.2.12.2.2
***************
*** 581,585 ****
else
{
! post("input devices:");
for (i = 0; i < nindevs; i++)
post("%d. %s", i+1, indevlist + i * DEVDESCSIZE);
--- 581,585 ----
else
{
! post("MIDI input devices:");
for (i = 0; i < nindevs; i++)
post("%d. %s", i+1, indevlist + i * DEVDESCSIZE);
***************
*** 589,593 ****
else
{
! post("output devices:");
for (i = 0; i < noutdevs; i++)
post("%d. %s", i+DEVONSET, outdevlist + i * DEVDESCSIZE);
--- 589,593 ----
else
{
! post("MIDI output devices:");
for (i = 0; i < noutdevs; i++)
post("%d. %s", i+DEVONSET, outdevlist + i * DEVDESCSIZE);
Index: d_soundfile.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_soundfile.c,v
retrieving revision 1.4.4.11.2.10
retrieving revision 1.4.4.11.2.10.2.1
diff -C2 -d -r1.4.4.11.2.10 -r1.4.4.11.2.10.2.1
*** d_soundfile.c 27 Nov 2006 18:16:09 -0000 1.4.4.11.2.10
--- d_soundfile.c 8 Dec 2006 07:00:25 -0000 1.4.4.11.2.10.2.1
***************
*** 200,215 ****
*/
! int open_soundfile(const char *dirname, const char *filename, int headersize,
int *p_bytespersamp, int *p_bigendian, int *p_nchannels, long *p_bytelimit,
long skipframes)
{
! char buf[OBUFSIZE], *bufptr;
! int fd, format, nchannels, bigendian, bytespersamp, swap, sysrtn;
long bytelimit = 0x7fffffff;
errno = 0;
- fd = open_via_path(dirname, filename,
- "", buf, &bufptr, MAXPDSTRING, 1);
- if (fd < 0)
- return (-1);
if (headersize >= 0) /* header detection overridden */
{
--- 200,210 ----
*/
! int open_soundfile_via_fd(int fd, int headersize,
int *p_bytespersamp, int *p_bigendian, int *p_nchannels, long *p_bytelimit,
long skipframes)
{
! int format, nchannels, bigendian, bytespersamp, swap, sysrtn;
long bytelimit = 0x7fffffff;
errno = 0;
if (headersize >= 0) /* header detection overridden */
{
***************
*** 221,224 ****
--- 216,220 ----
else
{
+ char buf[OBUFSIZE];
int bytesread = read(fd, buf, READHDRSIZE);
int format;
***************
*** 392,395 ****
--- 388,423 ----
}
+ /* open a soundfile, using open_via_path(). This is used by readsf~ in
+ a not-perfectly-threadsafe way. LATER replace with a thread-hardened
+ version of open_soundfile_via_canvas() */
+ int open_soundfile(const char *dirname, const char *filename, int headersize,
+ int *p_bytespersamp, int *p_bigendian, int *p_nchannels, long *p_bytelimit,
+ long skipframes)
+ {
+ char buf[OBUFSIZE], *bufptr;
+ int fd;
+ fd = open_via_path(dirname, filename, "", buf, &bufptr, MAXPDSTRING, 1);
+ if (fd < 0)
+ return (-1);
+ else return (open_soundfile_via_fd(fd, headersize, p_bytespersamp,
+ p_bigendian, p_nchannels, p_bytelimit, skipframes));
+ }
+
+ /* open a soundfile, using open_via_canvas(). This is used by readsf~ in
+ a not-perfectly-threadsafe way. LATER replace with a thread-hardened
+ version of open_soundfile_via_canvas() */
+ int open_soundfile_via_canvas(t_canvas *canvas, const char *filename, int headersize,
+ int *p_bytespersamp, int *p_bigendian, int *p_nchannels, long *p_bytelimit,
+ long skipframes)
+ {
+ char buf[OBUFSIZE], *bufptr;
+ int fd;
+ fd = canvas_open(canvas, filename, "", buf, &bufptr, MAXPDSTRING, 1);
+ if (fd < 0)
+ return (-1);
+ else return (open_soundfile_via_fd(fd, headersize, p_bytespersamp,
+ p_bigendian, p_nchannels, p_bytelimit, skipframes));
+ }
+
static void soundfile_xferin(int sfchannels, int nvecs, float **vecs,
long itemsread, unsigned char *buf, int nitems, int bytespersamp,
***************
*** 1971,1975 ****
finalsize = vecsize;
}
! fd = open_soundfile(canvas_getdir(x->x_canvas)->s_name, filename,
headersize, &bytespersamp, &bigendian, &channels, &bytelimit,
skipframes);
--- 1999,2003 ----
finalsize = vecsize;
}
! fd = open_soundfile_via_canvas(x->x_canvas, filename,
headersize, &bytespersamp, &bigendian, &channels, &bytelimit,
skipframes);
***************
*** 2733,2737 ****
else
{
- idle:
for (i = 0; i < noutlets; i++)
for (j = vecsize, fp = x->x_outvec[i]; j--; )
--- 2761,2764 ----
More information about the Pd-cvs
mailing list