From 7a3b2297e6f784e608d2013c910657334ee3019e Mon Sep 17 00:00:00 2001 From: Georg Holzmann Date: Sun, 20 Nov 2005 21:54:41 +0000 Subject: also works with pd_main now - additional threaded resize method svn path=/trunk/externals/tb/; revision=3991 --- sndfiler/src/sndfiler.c | 504 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 504 insertions(+) create mode 100755 sndfiler/src/sndfiler.c (limited to 'sndfiler/src/sndfiler.c') diff --git a/sndfiler/src/sndfiler.c b/sndfiler/src/sndfiler.c new file mode 100755 index 0000000..c1579ee --- /dev/null +++ b/sndfiler/src/sndfiler.c @@ -0,0 +1,504 @@ +/* + * + * threaded soundfiler based on libsndfile + * Copyright (C) 2005, Tim Blechmann + * (C) 2005, Georg Holzmann + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* to be compatible with main pd */ +#ifdef USE_PD_MAIN + +#define getalignedbytes(a) getbytes(a) +#define freealignedbytes(a,b) freebytes(a,b) +#include "threadlib.h" + +/* forward declaration */ +struct _garray +{ + t_gobj x_gobj; + t_scalar *x_scalar; /* scalar "containing" the array */ + t_glist *x_glist; /* containing glist */ + t_symbol *x_name; /* unexpanded name (possibly with leading '$') */ + t_symbol *x_realname; /* expanded name (symbol we're bound to) */ + char x_usedindsp; /* true if some DSP routine is using this */ + char x_saveit; /* true if we should save this with parent */ + char x_listviewing; /* true if list view window is open */ +}; + +#else /* now for pd_devel */ + +#include "m_pd.h" +#include "m_fifo.h" +#include "pthread.h" + +#endif /* USE_PD_MAIN */ + + +#include "g_canvas.h" +#include "sndfile.h" + +#include "stdlib.h" +#include "sched.h" /* for thread priority */ +#include + +/* for alloca */ +#ifdef MSW +#include +#else +#include "alloca.h" +#endif + +#if (_POSIX_MEMLOCK - 0) >= 200112L +#include +#endif /* _POSIX_MEMLOCK */ + + +/************ forward declarations **************/ + +#ifdef UNIX +/* real-time flag, true if priority boosted */ +extern int sys_hipriority; +#endif + +/* get a garray's "array" structure. */ +t_array *h_garray_getarray(t_garray *x) +{ + int zonset, ztype; + t_symbol *zarraytype; + t_scalar *sc = x->x_scalar; + t_symbol *templatesym = sc->sc_template; + t_template *_template = template_findbyname(templatesym); + if (!_template) + { + error("array: couldn't find template %s", templatesym->s_name); + return (0); + } + if (!template_find_field(_template, gensym("z"), + &zonset, &ztype, &zarraytype)) + { + error("array: template %s has no 'z' field", templatesym->s_name); + return (0); + } + if (ztype != DT_ARRAY) + { + error("array: template %s, 'z' field is not an array", + templatesym->s_name); + return (0); + } + return (sc->sc_vec[zonset].w_array); +} + + +/************ sndfiler **************/ + +static t_class *sndfiler_class; + +typedef struct _sndfiler +{ + t_object x_obj; + t_canvas *x_canvas; +} t_sndfiler; + +typedef struct _sfprocess +{ + void* padding; + /* callback function */ + void (* process) (t_sndfiler *, int, t_atom *); + t_sndfiler * x; /* soundfiler */ + int argc; + t_atom * argv; +} t_sfprocess; + +/* this is the queue for all soundfiler objects */ +typedef struct _sfqueue +{ + t_fifo* x_jobs; + + pthread_mutex_t mutex; + pthread_cond_t cond; +} t_sfqueue; + +typedef struct _syncdata +{ + t_garray** arrays; + t_float** helper_arrays; + int argc; + t_int frames; +} t_syncdata; + +static t_sfqueue sndfiler_queue; +static pthread_t sf_thread_id; /* id of soundfiler thread */ + +static t_sndfiler *sndfiler_new(void) +{ + t_sndfiler *x = (t_sndfiler *)pd_new(sndfiler_class); + x->x_canvas = canvas_getcurrent(); + outlet_new(&x->x_obj, &s_float); + return (x); +} + +/* global soundfiler thread ... sleeping until signaled */ +static void sndfiler_thread(void) +{ + while (1) + { + t_sfprocess * me; + pthread_cond_wait(&sndfiler_queue.cond, &sndfiler_queue.mutex); + + while (me = (t_sfprocess *)fifo_get(sndfiler_queue.x_jobs)) + { + (me->process)(me->x, me->argc, me->argv); + + /* freeing the argument vector */ + freebytes(me->argv, sizeof(t_atom) * me->argc); + freebytes(me, sizeof(t_sfprocess)); + } + } +} + +static void sndfiler_start_thread(void) +{ + pthread_attr_t sf_attr; + struct sched_param sf_param; + int status; + + //initialize queue + sndfiler_queue.x_jobs = fifo_init(); + pthread_mutex_init (&sndfiler_queue.mutex,NULL); + pthread_cond_init (&sndfiler_queue.cond,NULL); + + // initialize thread + pthread_attr_init(&sf_attr); + + sf_param.sched_priority=sched_get_priority_min(SCHED_OTHER); + pthread_attr_setschedparam(&sf_attr,&sf_param); + +#ifdef UNIX + if (sys_hipriority == 1/* && getuid() == 0 */) + { + sf_param.sched_priority=sched_get_priority_min(SCHED_RR); + pthread_attr_setschedpolicy(&sf_attr,SCHED_RR); + } +#endif /* UNIX */ + + //start thread + status = pthread_create(&sf_thread_id, &sf_attr, + (void *) sndfiler_thread,NULL); + + if (status != 0) + error("Couldn't create sndfiler thread: %d",status); + else + post("Global sndfiler thread launched, priority: %d", + sf_param.sched_priority); +} + +static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv); + +/* syntax: + * read soundfile array0..n + * if the soundfile has less channels than arrays are given, these arrays are + * set to zero + * if there are too little arrays given, only the first n channels will be used + * */ +static void sndfiler_read(t_sndfiler * x, t_symbol *s, int argc, t_atom* argv) +{ + t_sfprocess * process = getbytes(sizeof(t_sfprocess)); + + process->process = &sndfiler_read_cb; + process->x = x; + process->argc = argc; + process->argv = (t_atom*) copybytes(argv, sizeof(t_atom) * argc); + + fifo_put(sndfiler_queue.x_jobs, process); + + pthread_cond_signal(&sndfiler_queue.cond); +} + +static t_int sndfiler_synchonize(t_int * w); + +static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv) +{ + int i, j; + int channel_count; + t_float** helper_arrays; + + t_symbol* file; + t_garray ** arrays; + + SNDFILE* sndfile; + SF_INFO info; + + if (argc < 2) + { + pd_error(x, "usage: read soundfile array1 array2 ..."); + return; + } + + file = atom_getsymbolarg(0, argc, argv); + + channel_count = argc - 1; + helper_arrays = getbytes(channel_count * sizeof(t_float*)); + + arrays = getbytes(channel_count * sizeof(t_garray*)); + for (i = 0; i != channel_count; ++i) + { + t_garray * array = (t_garray *)pd_findbyclass(atom_getsymbolarg(i+1, + argc, argv), garray_class); + + if (array) + arrays[i] = array; + else + { + pd_error(x, "%s: no such array", atom_getsymbolarg(i+1, argc, argv)->s_name); + return; + } + } + + post("sndfiler: loading file ..."); + + sndfile = sf_open(file->s_name, SFM_READ, &info); + + if (sndfile) + { + int maxchannels = (channel_count < info.channels) ? + channel_count : info.channels; + + t_float * item = alloca(maxchannels * sizeof(t_float)); + + t_int ** syncdata = getbytes(sizeof(t_int*) * 5); + +#if (_POSIX_MEMLOCK - 0) >= 200112L + munlockall(); +#endif + + for (i = 0; i != channel_count; ++i) + { + helper_arrays[i] = getalignedbytes(info.frames * sizeof(t_float)); + } + + for (i = 0; i != info.frames; ++i) + { + sf_read_float(sndfile, item, info.channels); + + for (j = 0; j != info.channels; ++j) + { + if (j < channel_count) + { + helper_arrays[j][i] = item[j]; + } + } + } + +#if (_POSIX_MEMLOCK - 0) >= 200112L + mlockall(MCL_FUTURE); +#endif + + sf_close(sndfile); + + syncdata[0] = (t_int*)arrays; + syncdata[1] = (t_int*)helper_arrays; + syncdata[2] = (t_int*)channel_count; + syncdata[3] = (t_int*)(long)info.frames; + syncdata[4] = (t_int*)x; + + sys_callback(sndfiler_synchonize, (t_int*)syncdata, 5); + } + else + pd_error(x, "Error opening file"); +} + +static t_int sndfiler_synchonize(t_int * w) +{ + int i; + t_garray** arrays = (t_garray**) w[0]; + t_float** helper_arrays = (t_float**) w[1]; + t_int channel_count = (t_int)w[2]; + t_int frames = (t_int)w[3]; + t_sndfiler* x = (t_sndfiler*)w[4]; + + for (i = 0; i != channel_count; ++i) + { + t_garray * garray = arrays[i]; + t_array * array = h_garray_getarray(garray); + t_glist * gl = garray->x_glist;; + + freealignedbytes(array->a_vec, array->a_n); + array->a_vec = (char*)helper_arrays[i]; + array->a_n = frames; + + if (gl->gl_list == &garray->x_gobj && !garray->x_gobj.g_next) + { + vmess(&gl->gl_pd, gensym("bounds"), "ffff", 0., gl->gl_y1, + (double)(frames > 1 ? frames-1 : 1), gl->gl_y2); + + /* close any dialogs that might have the wrong info now... */ + gfxstub_deleteforkey(gl); + } + else + garray_redraw(garray); + } + + free(arrays); + free(helper_arrays); + + canvas_update_dsp(); + + outlet_float(x->x_obj.ob_outlet, frames); + + return 0; +} + +static void sndfiler_t_resize(t_sndfiler * y, int argc, t_atom* argv); + +/* syntax: + * resize table size + * */ +static void sndfiler_resize(t_sndfiler * x, t_symbol *s, int argc, t_atom* argv) +{ + t_sfprocess * process = getbytes(sizeof(t_sfprocess)); + + process->process = &sndfiler_t_resize; + process->x = x; + process->argc = argc; + process->argv = (t_atom*) copybytes(argv, sizeof(t_atom) * argc); + + fifo_put(sndfiler_queue.x_jobs, process); + + pthread_cond_signal(&sndfiler_queue.cond); +} + +static void sndfiler_t_resize(t_sndfiler *y, int argc, t_atom *argv) +{ + int was, elemsize; /* array contains was elements of size elemsize */ + t_float * vec; /* old array */ + t_glist *gl; + int n; /* resize of n elements */ + char *nvec; /* new array */ + + t_garray * x = (t_garray *)pd_findbyclass(argv[0].a_w.w_symbol, garray_class); + t_array *data = h_garray_getarray(x); + + if (!(x)) + { + pd_error(y, "%s: no such table", argv[0].a_w.w_symbol->s_name); + goto usage; + } + + vec = (t_float*) data->a_vec; + was = data->a_n; + + if ((argv+1)->a_type == A_FLOAT) + n = (int) (argv+1)->a_w.w_float; + else + goto usage; + + if (n == was) return; + + if (n < 1) n = 1; + elemsize = template_findbyname(data->a_templatesym)->t_n * sizeof(t_word); + +#if (_POSIX_MEMLOCK - 0) >= 200112L + munlockall(); +#endif + + if (was > n) + nvec = (char*)copybytes(data->a_vec, was * elemsize); + else + { + nvec = getbytes(n * elemsize); + memcpy (nvec, data->a_vec, was * elemsize); + + /* LATER should check t_resizebytes result */ + memset(nvec + was*elemsize, 0, (n - was) * elemsize); + } + + if (!nvec) + { + pd_error(x, "array resize failed: out of memory"); + +#if (_POSIX_MEMLOCK - 0) >= 200112L + mlockall(MCL_FUTURE); +#endif + + return; + } + + /* TB: we'll have to be sure that no one is accessing the array */ + sys_lock(); + +#ifdef GARRAY_THREAD_LOCK + garray_lock(x); +#endif + + data->a_vec = nvec; + data->a_n = n; + +#ifdef GARRAY_THREAD_LOCK + garray_unlock(x); +#endif + + if (x->x_usedindsp) canvas_update_dsp(); + sys_unlock(); + + /* if this is the only array in the graph, + reset the graph's coordinates */ + gl = x->x_glist; + if (gl->gl_list == &x->x_gobj && !x->x_gobj.g_next) + { + vmess(&gl->gl_pd, gensym("bounds"), "ffff", + 0., gl->gl_y1, (double)(n > 1 ? n-1 : 1), gl->gl_y2); + /* close any dialogs that might have the wrong info now... */ + gfxstub_deleteforkey(gl); + } + else garray_redraw(x); + + freebytes (vec, was * elemsize); + +#if (_POSIX_MEMLOCK - 0) >= 200112L + mlockall(MCL_FUTURE); +#endif + + sys_lock(); + outlet_float(y->x_obj.ob_outlet, (float)atom_getintarg(1,argc,argv)); + sys_unlock(); + + return; + + usage: + pd_error(x, "usage: resize tablename size"); +} + +void sndfiler_setup(void) +{ + sndfiler_class = class_new(gensym("sndfiler"), + (t_newmethod)sndfiler_new, 0, + sizeof(t_sndfiler), 0, 0); + + class_addmethod(sndfiler_class, (t_method)sndfiler_read, + gensym("read"), A_GIMME, 0); + class_addmethod(sndfiler_class, (t_method)sndfiler_resize, + gensym("resize"), A_GIMME, 0); + +#ifdef USE_PD_MAIN + // needed to start thread callback system + threadlib_setup(); +#endif + + // starts helper thread + sndfiler_start_thread(); +} -- cgit v1.2.1 From bc96a98d953afbee541b5e5b5bbcfc99f86842bb Mon Sep 17 00:00:00 2001 From: Georg Holzmann Date: Mon, 28 Nov 2005 22:27:20 +0000 Subject: new flags: -resize and -skip svn path=/trunk/externals/tb/; revision=4073 --- sndfiler/src/sndfiler.c | 124 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 104 insertions(+), 20 deletions(-) (limited to 'sndfiler/src/sndfiler.c') diff --git a/sndfiler/src/sndfiler.c b/sndfiler/src/sndfiler.c index c1579ee..80df1c9 100755 --- a/sndfiler/src/sndfiler.c +++ b/sndfiler/src/sndfiler.c @@ -236,18 +236,37 @@ static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv) int i, j; int channel_count; t_float** helper_arrays; + int resize = 0; + int seek = 0, arraysize = 0, writesize; t_symbol* file; t_garray ** arrays; SNDFILE* sndfile; SF_INFO info; - - if (argc < 2) + + // parse flags + while (argc > 0 && argv->a_type == A_SYMBOL && + *argv->a_w.w_symbol->s_name == '-') { - pd_error(x, "usage: read soundfile array1 array2 ..."); - return; + char *flag = argv->a_w.w_symbol->s_name + 1; + if (!strcmp(flag, "resize")) + { + resize = 1; + argc -= 1; argv += 1; + } + else if (!strcmp(flag, "skip")) + { + if (argc < 2 || argv[1].a_type != A_FLOAT || + ((seek = argv[1].a_w.w_float) == 0)) + goto usage; + argc -= 2; argv += 2; + } + else goto usage; } + + if (argc < 2) + goto usage; file = atom_getsymbolarg(0, argc, argv); @@ -257,41 +276,83 @@ static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv) arrays = getbytes(channel_count * sizeof(t_garray*)); for (i = 0; i != channel_count; ++i) { - t_garray * array = (t_garray *)pd_findbyclass(atom_getsymbolarg(i+1, - argc, argv), garray_class); - - if (array) - arrays[i] = array; - else - { - pd_error(x, "%s: no such array", atom_getsymbolarg(i+1, argc, argv)->s_name); - return; - } + t_float *dummy; + int size; + t_garray *array; + + if(!(array = (t_garray *)pd_findbyclass( + atom_getsymbolarg(i+1, argc, argv), garray_class))) + { + pd_error(x, "%s: no such array", atom_getsymbolarg(i+1, + argc, argv)->s_name); + return; + } + + if(garray_getfloatarray(array, &size, &dummy)) + arrays[i] = array; + else + { + pd_error(x, "%s: bad template for sndfiler", atom_getsymbolarg(i+1, + argc, argv)->s_name); + return; + } + + // in multichannel mode: check if arrays have different length + if (arraysize && arraysize != size && !resize) + { + post("sndfiler: arrays have different lengths, resizing to last one ..."); + } + arraysize = size; } - post("sndfiler: loading file ..."); - sndfile = sf_open(file->s_name, SFM_READ, &info); if (sndfile) { + int pos = 0; int maxchannels = (channel_count < info.channels) ? channel_count : info.channels; t_float * item = alloca(maxchannels * sizeof(t_float)); t_int ** syncdata = getbytes(sizeof(t_int*) * 5); - + + // negative seek: offset from the end of the file + if(seek<0) + { + pos = sf_seek(sndfile, seek, SEEK_END); + } + if(seek>0) + { + pos = sf_seek(sndfile, seek, SEEK_SET); + } + if(pos == -1) + { + pd_error(x, "invalid seek in soundfile"); + return; + } + + if(resize) + { + writesize = (info.frames-pos); + arraysize = writesize; + } + else + writesize = (arraysize>(info.frames-pos)) ? + info.frames-pos : arraysize; + + post("sndfiler: loading file ..."); + #if (_POSIX_MEMLOCK - 0) >= 200112L munlockall(); #endif for (i = 0; i != channel_count; ++i) { - helper_arrays[i] = getalignedbytes(info.frames * sizeof(t_float)); + helper_arrays[i] = getalignedbytes(arraysize * sizeof(t_float)); } - for (i = 0; i != info.frames; ++i) + for (i = 0; i != writesize; ++i) { sf_read_float(sndfile, item, info.channels); @@ -303,6 +364,21 @@ static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv) } } } + + // fill remaining elements with zero + if(!resize && (arraysize>(info.frames-pos))) + { + for (i = writesize; i != arraysize; ++i) + { + for (j = 0; j != info.channels; ++j) + { + if (j < channel_count) + { + helper_arrays[j][i] = 0; + } + } + } + } #if (_POSIX_MEMLOCK - 0) >= 200112L mlockall(MCL_FUTURE); @@ -313,13 +389,21 @@ static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv) syncdata[0] = (t_int*)arrays; syncdata[1] = (t_int*)helper_arrays; syncdata[2] = (t_int*)channel_count; - syncdata[3] = (t_int*)(long)info.frames; + syncdata[3] = (t_int*)arraysize; syncdata[4] = (t_int*)x; sys_callback(sndfiler_synchonize, (t_int*)syncdata, 5); + return; } else + { pd_error(x, "Error opening file"); + return; + } + + usage: + pd_error(x, "usage: read [flags] filename array1 array2 ..."); + post("flags: -skip -resize "); } static t_int sndfiler_synchonize(t_int * w) -- cgit v1.2.1 From 5f7d939d6e3a11830d63afe259d31d3ff3a9f8bb Mon Sep 17 00:00:00 2001 From: Georg Holzmann Date: Tue, 29 Nov 2005 18:34:32 +0000 Subject: removed annoying debug post svn path=/trunk/externals/tb/; revision=4082 --- sndfiler/src/sndfiler.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'sndfiler/src/sndfiler.c') diff --git a/sndfiler/src/sndfiler.c b/sndfiler/src/sndfiler.c index 80df1c9..227a261 100755 --- a/sndfiler/src/sndfiler.c +++ b/sndfiler/src/sndfiler.c @@ -341,8 +341,6 @@ static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv) writesize = (arraysize>(info.frames-pos)) ? info.frames-pos : arraysize; - post("sndfiler: loading file ..."); - #if (_POSIX_MEMLOCK - 0) >= 200112L munlockall(); #endif -- cgit v1.2.1 From 153d5c53085f3c4d5f89af9f4db04fb97d80ba93 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Fri, 16 Dec 2005 08:34:10 +0000 Subject: using a semaphore instead of a condion variable for synchronization svn path=/trunk/externals/tb/; revision=4235 --- sndfiler/src/sndfiler.c | 192 ++++++++++++++++++++++++------------------------ 1 file changed, 95 insertions(+), 97 deletions(-) (limited to 'sndfiler/src/sndfiler.c') diff --git a/sndfiler/src/sndfiler.c b/sndfiler/src/sndfiler.c index 227a261..38ebfa8 100755 --- a/sndfiler/src/sndfiler.c +++ b/sndfiler/src/sndfiler.c @@ -45,6 +45,7 @@ struct _garray #include "m_pd.h" #include "m_fifo.h" #include "pthread.h" +#include "semaphore.h" #endif /* USE_PD_MAIN */ @@ -89,7 +90,7 @@ t_array *h_garray_getarray(t_garray *x) return (0); } if (!template_find_field(_template, gensym("z"), - &zonset, &ztype, &zarraytype)) + &zonset, &ztype, &zarraytype)) { error("array: template %s has no 'z' field", templatesym->s_name); return (0); @@ -97,7 +98,7 @@ t_array *h_garray_getarray(t_garray *x) if (ztype != DT_ARRAY) { error("array: template %s, 'z' field is not an array", - templatesym->s_name); + templatesym->s_name); return (0); } return (sc->sc_vec[zonset].w_array); @@ -128,9 +129,7 @@ typedef struct _sfprocess typedef struct _sfqueue { t_fifo* x_jobs; - - pthread_mutex_t mutex; - pthread_cond_t cond; + sem_t sem; } t_sfqueue; typedef struct _syncdata @@ -158,8 +157,8 @@ static void sndfiler_thread(void) while (1) { t_sfprocess * me; - pthread_cond_wait(&sndfiler_queue.cond, &sndfiler_queue.mutex); - + sem_wait(&sndfiler_queue.sem); + while (me = (t_sfprocess *)fifo_get(sndfiler_queue.x_jobs)) { (me->process)(me->x, me->argc, me->argv); @@ -179,9 +178,8 @@ static void sndfiler_start_thread(void) //initialize queue sndfiler_queue.x_jobs = fifo_init(); - pthread_mutex_init (&sndfiler_queue.mutex,NULL); - pthread_cond_init (&sndfiler_queue.cond,NULL); - + sem_init (&sndfiler_queue.sem,0,0); + // initialize thread pthread_attr_init(&sf_attr); @@ -198,13 +196,13 @@ static void sndfiler_start_thread(void) //start thread status = pthread_create(&sf_thread_id, &sf_attr, - (void *) sndfiler_thread,NULL); + (void *) sndfiler_thread,NULL); if (status != 0) error("Couldn't create sndfiler thread: %d",status); else post("Global sndfiler thread launched, priority: %d", - sf_param.sched_priority); + sf_param.sched_priority); } static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv); @@ -226,7 +224,7 @@ static void sndfiler_read(t_sndfiler * x, t_symbol *s, int argc, t_atom* argv) fifo_put(sndfiler_queue.x_jobs, process); - pthread_cond_signal(&sndfiler_queue.cond); + sem_post(&sndfiler_queue.sem); } static t_int sndfiler_synchonize(t_int * w); @@ -247,22 +245,22 @@ static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv) // parse flags while (argc > 0 && argv->a_type == A_SYMBOL && - *argv->a_w.w_symbol->s_name == '-') + *argv->a_w.w_symbol->s_name == '-') { char *flag = argv->a_w.w_symbol->s_name + 1; - if (!strcmp(flag, "resize")) - { - resize = 1; - argc -= 1; argv += 1; - } - else if (!strcmp(flag, "skip")) - { - if (argc < 2 || argv[1].a_type != A_FLOAT || - ((seek = argv[1].a_w.w_float) == 0)) - goto usage; - argc -= 2; argv += 2; - } - else goto usage; + if (!strcmp(flag, "resize")) + { + resize = 1; + argc -= 1; argv += 1; + } + else if (!strcmp(flag, "skip")) + { + if (argc < 2 || argv[1].a_type != A_FLOAT || + ((seek = argv[1].a_w.w_float) == 0)) + goto usage; + argc -= 2; argv += 2; + } + else goto usage; } if (argc < 2) @@ -277,32 +275,32 @@ static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv) for (i = 0; i != channel_count; ++i) { t_float *dummy; - int size; + int size; t_garray *array; if(!(array = (t_garray *)pd_findbyclass( - atom_getsymbolarg(i+1, argc, argv), garray_class))) - { - pd_error(x, "%s: no such array", atom_getsymbolarg(i+1, - argc, argv)->s_name); - return; - } + atom_getsymbolarg(i+1, argc, argv), garray_class))) + { + pd_error(x, "%s: no such array", atom_getsymbolarg(i+1, + argc, argv)->s_name); + return; + } - if(garray_getfloatarray(array, &size, &dummy)) - arrays[i] = array; - else - { - pd_error(x, "%s: bad template for sndfiler", atom_getsymbolarg(i+1, - argc, argv)->s_name); - return; - } + if(garray_getfloatarray(array, &size, &dummy)) + arrays[i] = array; + else + { + pd_error(x, "%s: bad template for sndfiler", atom_getsymbolarg(i+1, + argc, argv)->s_name); + return; + } - // in multichannel mode: check if arrays have different length - if (arraysize && arraysize != size && !resize) - { - post("sndfiler: arrays have different lengths, resizing to last one ..."); - } - arraysize = size; + // in multichannel mode: check if arrays have different length + if (arraysize && arraysize != size && !resize) + { + post("sndfiler: arrays have different lengths, resizing to last one ..."); + } + arraysize = size; } sndfile = sf_open(file->s_name, SFM_READ, &info); @@ -311,35 +309,35 @@ static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv) { int pos = 0; int maxchannels = (channel_count < info.channels) ? - channel_count : info.channels; + channel_count : info.channels; t_float * item = alloca(maxchannels * sizeof(t_float)); t_int ** syncdata = getbytes(sizeof(t_int*) * 5); - // negative seek: offset from the end of the file - if(seek<0) - { - pos = sf_seek(sndfile, seek, SEEK_END); - } - if(seek>0) - { - pos = sf_seek(sndfile, seek, SEEK_SET); - } - if(pos == -1) - { - pd_error(x, "invalid seek in soundfile"); - return; - } + // negative seek: offset from the end of the file + if(seek<0) + { + pos = sf_seek(sndfile, seek, SEEK_END); + } + if(seek>0) + { + pos = sf_seek(sndfile, seek, SEEK_SET); + } + if(pos == -1) + { + pd_error(x, "invalid seek in soundfile"); + return; + } - if(resize) - { - writesize = (info.frames-pos); - arraysize = writesize; - } - else - writesize = (arraysize>(info.frames-pos)) ? - info.frames-pos : arraysize; + if(resize) + { + writesize = (info.frames-pos); + arraysize = writesize; + } + else + writesize = (arraysize>(info.frames-pos)) ? + info.frames-pos : arraysize; #if (_POSIX_MEMLOCK - 0) >= 200112L munlockall(); @@ -363,20 +361,20 @@ static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv) } } - // fill remaining elements with zero - if(!resize && (arraysize>(info.frames-pos))) - { - for (i = writesize; i != arraysize; ++i) - { - for (j = 0; j != info.channels; ++j) - { - if (j < channel_count) - { - helper_arrays[j][i] = 0; - } - } - } - } + // fill remaining elements with zero + if(!resize && (arraysize>(info.frames-pos))) + { + for (i = writesize; i != arraysize; ++i) + { + for (j = 0; j != info.channels; ++j) + { + if (j < channel_count) + { + helper_arrays[j][i] = 0; + } + } + } + } #if (_POSIX_MEMLOCK - 0) >= 200112L mlockall(MCL_FUTURE); @@ -391,17 +389,17 @@ static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv) syncdata[4] = (t_int*)x; sys_callback(sndfiler_synchonize, (t_int*)syncdata, 5); - return; + return; } else { pd_error(x, "Error opening file"); - return; + return; } - usage: + usage: pd_error(x, "usage: read [flags] filename array1 array2 ..."); - post("flags: -skip -resize "); + post("flags: -skip -resize "); } static t_int sndfiler_synchonize(t_int * w) @@ -426,7 +424,7 @@ static t_int sndfiler_synchonize(t_int * w) if (gl->gl_list == &garray->x_gobj && !garray->x_gobj.g_next) { vmess(&gl->gl_pd, gensym("bounds"), "ffff", 0., gl->gl_y1, - (double)(frames > 1 ? frames-1 : 1), gl->gl_y2); + (double)(frames > 1 ? frames-1 : 1), gl->gl_y2); /* close any dialogs that might have the wrong info now... */ gfxstub_deleteforkey(gl); @@ -461,7 +459,7 @@ static void sndfiler_resize(t_sndfiler * x, t_symbol *s, int argc, t_atom* argv) fifo_put(sndfiler_queue.x_jobs, process); - pthread_cond_signal(&sndfiler_queue.cond); + sem_post(&sndfiler_queue.sem); } static void sndfiler_t_resize(t_sndfiler *y, int argc, t_atom *argv) @@ -561,20 +559,20 @@ static void sndfiler_t_resize(t_sndfiler *y, int argc, t_atom *argv) return; - usage: - pd_error(x, "usage: resize tablename size"); + usage: + pd_error(x, "usage: resize tablename size"); } void sndfiler_setup(void) { sndfiler_class = class_new(gensym("sndfiler"), - (t_newmethod)sndfiler_new, 0, - sizeof(t_sndfiler), 0, 0); + (t_newmethod)sndfiler_new, 0, + sizeof(t_sndfiler), 0, 0); class_addmethod(sndfiler_class, (t_method)sndfiler_read, - gensym("read"), A_GIMME, 0); + gensym("read"), A_GIMME, 0); class_addmethod(sndfiler_class, (t_method)sndfiler_resize, - gensym("resize"), A_GIMME, 0); + gensym("resize"), A_GIMME, 0); #ifdef USE_PD_MAIN // needed to start thread callback system -- cgit v1.2.1 From f35587d21c1b141c847e8660403941ea53963447 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Thu, 22 Dec 2005 23:45:20 +0000 Subject: export sndfiler_setup function for Windows svn path=/trunk/externals/tb/; revision=4287 --- sndfiler/src/sndfiler.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sndfiler/src/sndfiler.c') diff --git a/sndfiler/src/sndfiler.c b/sndfiler/src/sndfiler.c index 38ebfa8..005b75f 100755 --- a/sndfiler/src/sndfiler.c +++ b/sndfiler/src/sndfiler.c @@ -563,6 +563,9 @@ static void sndfiler_t_resize(t_sndfiler *y, int argc, t_atom *argv) pd_error(x, "usage: resize tablename size"); } +#ifdef _MSC_VER +__declspec(dllexport) +#endif void sndfiler_setup(void) { sndfiler_class = class_new(gensym("sndfiler"), -- cgit v1.2.1 From b65ae6220a420b3a0b1ed23d8ef0934379cebbb6 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Thu, 19 Jan 2006 21:02:12 +0000 Subject: fixes for OSX (doesn't have a sem_init function) svn path=/trunk/externals/tb/; revision=4447 --- sndfiler/src/sndfiler.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'sndfiler/src/sndfiler.c') diff --git a/sndfiler/src/sndfiler.c b/sndfiler/src/sndfiler.c index 005b75f..6d1e4c6 100755 --- a/sndfiler/src/sndfiler.c +++ b/sndfiler/src/sndfiler.c @@ -129,7 +129,7 @@ typedef struct _sfprocess typedef struct _sfqueue { t_fifo* x_jobs; - sem_t sem; + sem_t* sem; } t_sfqueue; typedef struct _syncdata @@ -154,11 +154,11 @@ static t_sndfiler *sndfiler_new(void) /* global soundfiler thread ... sleeping until signaled */ static void sndfiler_thread(void) { - while (1) + for(;;) { t_sfprocess * me; - sem_wait(&sndfiler_queue.sem); - + sem_wait(sndfiler_queue.sem); + while (me = (t_sfprocess *)fifo_get(sndfiler_queue.x_jobs)) { (me->process)(me->x, me->argc, me->argv); @@ -178,8 +178,17 @@ static void sndfiler_start_thread(void) //initialize queue sndfiler_queue.x_jobs = fifo_init(); - sem_init (&sndfiler_queue.sem,0,0); - +#ifdef __APPLE__ + sndfiler_queue.sem = sem_open("sndfilerthread",O_CREAT|O_EXCL,0,0); + if(sndfiler_queue.sem == SEM_FAILED) + error("Couldn't create sndfiler semaphore: %i",errno); +#else + sndfiler_queue.sem = (sem_t *)getbytes(sizeof(sem_t)); + status = sem_init(sndfiler_queue.sem,0,0); + if(status != 0) + error("Couldn't create sndfiler semaphore: %i",status); +#endif + // initialize thread pthread_attr_init(&sf_attr); @@ -224,7 +233,7 @@ static void sndfiler_read(t_sndfiler * x, t_symbol *s, int argc, t_atom* argv) fifo_put(sndfiler_queue.x_jobs, process); - sem_post(&sndfiler_queue.sem); + sem_post(sndfiler_queue.sem); } static t_int sndfiler_synchonize(t_int * w); @@ -459,7 +468,7 @@ static void sndfiler_resize(t_sndfiler * x, t_symbol *s, int argc, t_atom* argv) fifo_put(sndfiler_queue.x_jobs, process); - sem_post(&sndfiler_queue.sem); + sem_post(sndfiler_queue.sem); } static void sndfiler_t_resize(t_sndfiler *y, int argc, t_atom *argv) -- cgit v1.2.1 From a556c60dc72ddf3bd7b4e1cfc3c85f999ccb6e51 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Thu, 19 Jan 2006 22:21:01 +0000 Subject: better fixes for OSX (use kernel functions) svn path=/trunk/externals/tb/; revision=4448 --- sndfiler/src/sndfiler.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'sndfiler/src/sndfiler.c') diff --git a/sndfiler/src/sndfiler.c b/sndfiler/src/sndfiler.c index 6d1e4c6..aa6d8d2 100755 --- a/sndfiler/src/sndfiler.c +++ b/sndfiler/src/sndfiler.c @@ -44,6 +44,7 @@ struct _garray #include "m_pd.h" #include "m_fifo.h" + #include "pthread.h" #include "semaphore.h" @@ -68,6 +69,18 @@ struct _garray #include #endif /* _POSIX_MEMLOCK */ +#ifdef __APPLE__ +#include +#define SEM_T semaphore_t +#define SEM_INIT(s) (semaphore_create(mach_task_self(),&s,SYNC_POLICY_FIFO,0) == 0) +#define SEM_SIGNAL(s) semaphore_signal(s) +#define SEM_WAIT(s) semaphore_wait(s) +#else +#define SEM_T sem_t +#define SEM_INIT(s) (sem_init(&s,0,0) == 0) +#define SEM_SIGNAL(s) sem_post(&s) +#define SEM_WAIT(s) sem_wait(&s) +#endif /************ forward declarations **************/ @@ -129,7 +142,7 @@ typedef struct _sfprocess typedef struct _sfqueue { t_fifo* x_jobs; - sem_t* sem; + SEM_T sem; } t_sfqueue; typedef struct _syncdata @@ -157,7 +170,7 @@ static void sndfiler_thread(void) for(;;) { t_sfprocess * me; - sem_wait(sndfiler_queue.sem); + SEM_WAIT(sndfiler_queue.sem); while (me = (t_sfprocess *)fifo_get(sndfiler_queue.x_jobs)) { @@ -178,16 +191,10 @@ static void sndfiler_start_thread(void) //initialize queue sndfiler_queue.x_jobs = fifo_init(); -#ifdef __APPLE__ - sndfiler_queue.sem = sem_open("sndfilerthread",O_CREAT|O_EXCL,0,0); - if(sndfiler_queue.sem == SEM_FAILED) - error("Couldn't create sndfiler semaphore: %i",errno); -#else - sndfiler_queue.sem = (sem_t *)getbytes(sizeof(sem_t)); - status = sem_init(sndfiler_queue.sem,0,0); - if(status != 0) + + status = SEM_INIT(sndfiler_queue.sem); + if(!status) error("Couldn't create sndfiler semaphore: %i",status); -#endif // initialize thread pthread_attr_init(&sf_attr); @@ -233,7 +240,7 @@ static void sndfiler_read(t_sndfiler * x, t_symbol *s, int argc, t_atom* argv) fifo_put(sndfiler_queue.x_jobs, process); - sem_post(sndfiler_queue.sem); + SEM_SIGNAL(sndfiler_queue.sem); } static t_int sndfiler_synchonize(t_int * w); @@ -468,7 +475,7 @@ static void sndfiler_resize(t_sndfiler * x, t_symbol *s, int argc, t_atom* argv) fifo_put(sndfiler_queue.x_jobs, process); - sem_post(sndfiler_queue.sem); + SEM_SIGNAL(sndfiler_queue.sem); } static void sndfiler_t_resize(t_sndfiler *y, int argc, t_atom *argv) -- cgit v1.2.1 From c9f622385bb18ecfe16e7810507d5ddc1330e468 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Fri, 20 Jan 2006 07:39:13 +0000 Subject: Included more Mach headers for function prototypes svn path=/trunk/externals/tb/; revision=4450 --- sndfiler/src/sndfiler.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sndfiler/src/sndfiler.c') diff --git a/sndfiler/src/sndfiler.c b/sndfiler/src/sndfiler.c index aa6d8d2..8c4dbe5 100755 --- a/sndfiler/src/sndfiler.c +++ b/sndfiler/src/sndfiler.c @@ -70,6 +70,8 @@ struct _garray #endif /* _POSIX_MEMLOCK */ #ifdef __APPLE__ +#include +#include #include #define SEM_T semaphore_t #define SEM_INIT(s) (semaphore_create(mach_task_self(),&s,SYNC_POLICY_FIFO,0) == 0) -- cgit v1.2.1 From 60fee223a0a27439814547aee438bb5c53e44437 Mon Sep 17 00:00:00 2001 From: Georg Holzmann Date: Sun, 29 Jan 2006 19:29:29 +0000 Subject: fixed compilation for main pd svn path=/trunk/externals/tb/; revision=4517 --- sndfiler/src/sndfiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sndfiler/src/sndfiler.c') diff --git a/sndfiler/src/sndfiler.c b/sndfiler/src/sndfiler.c index 8c4dbe5..507510a 100755 --- a/sndfiler/src/sndfiler.c +++ b/sndfiler/src/sndfiler.c @@ -46,7 +46,6 @@ struct _garray #include "m_fifo.h" #include "pthread.h" -#include "semaphore.h" #endif /* USE_PD_MAIN */ @@ -57,6 +56,7 @@ struct _garray #include "stdlib.h" #include "sched.h" /* for thread priority */ #include +#include "semaphore.h" /* for alloca */ #ifdef MSW -- cgit v1.2.1 From 682501946dd0637cfe9fc2477bc3a6e78c032349 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Sun, 29 Jan 2006 22:13:49 +0000 Subject: limit stacksize of helper thread to 1mb ... should be more than enough ... svn path=/trunk/externals/tb/; revision=4518 --- sndfiler/src/sndfiler.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sndfiler/src/sndfiler.c') diff --git a/sndfiler/src/sndfiler.c b/sndfiler/src/sndfiler.c index 507510a..9bf6b65 100755 --- a/sndfiler/src/sndfiler.c +++ b/sndfiler/src/sndfiler.c @@ -203,7 +203,10 @@ static void sndfiler_start_thread(void) sf_param.sched_priority=sched_get_priority_min(SCHED_OTHER); pthread_attr_setschedparam(&sf_attr,&sf_param); - + + /* 1mb of stack should be enough */ + pthread_attr_setstacksize(&sf_attr,1048576); + #ifdef UNIX if (sys_hipriority == 1/* && getuid() == 0 */) { -- cgit v1.2.1 From 10dee9a91925645cd9e3bb14e5ef31e8a338949e Mon Sep 17 00:00:00 2001 From: Georg Holzmann Date: Wed, 1 Feb 2006 09:01:28 +0000 Subject: now possible to read ogg file (using libvorbisfile) svn path=/trunk/externals/tb/; revision=4531 --- sndfiler/src/sndfiler.c | 170 +++++++++--------------------------------------- 1 file changed, 30 insertions(+), 140 deletions(-) (limited to 'sndfiler/src/sndfiler.c') diff --git a/sndfiler/src/sndfiler.c b/sndfiler/src/sndfiler.c index 9bf6b65..4cd14d9 100755 --- a/sndfiler/src/sndfiler.c +++ b/sndfiler/src/sndfiler.c @@ -1,6 +1,6 @@ /* * - * threaded soundfiler based on libsndfile + * threaded soundfiler for pd * Copyright (C) 2005, Tim Blechmann * (C) 2005, Georg Holzmann * @@ -20,14 +20,18 @@ * Boston, MA 02111-1307, USA. */ -/* to be compatible with main pd */ -#ifdef USE_PD_MAIN +#include "sndfiler.h" +#include "file_input.h" + -#define getalignedbytes(a) getbytes(a) -#define freealignedbytes(a,b) freebytes(a,b) -#include "threadlib.h" +/************ forward declarations **************/ -/* forward declaration */ +#ifdef UNIX +/* real-time flag, true if priority boosted */ +extern int sys_hipriority; +#endif + +#ifdef USE_PD_MAIN struct _garray { t_gobj x_gobj; @@ -39,56 +43,6 @@ struct _garray char x_saveit; /* true if we should save this with parent */ char x_listviewing; /* true if list view window is open */ }; - -#else /* now for pd_devel */ - -#include "m_pd.h" -#include "m_fifo.h" - -#include "pthread.h" - -#endif /* USE_PD_MAIN */ - - -#include "g_canvas.h" -#include "sndfile.h" - -#include "stdlib.h" -#include "sched.h" /* for thread priority */ -#include -#include "semaphore.h" - -/* for alloca */ -#ifdef MSW -#include -#else -#include "alloca.h" -#endif - -#if (_POSIX_MEMLOCK - 0) >= 200112L -#include -#endif /* _POSIX_MEMLOCK */ - -#ifdef __APPLE__ -#include -#include -#include -#define SEM_T semaphore_t -#define SEM_INIT(s) (semaphore_create(mach_task_self(),&s,SYNC_POLICY_FIFO,0) == 0) -#define SEM_SIGNAL(s) semaphore_signal(s) -#define SEM_WAIT(s) semaphore_wait(s) -#else -#define SEM_T sem_t -#define SEM_INIT(s) (sem_init(&s,0,0) == 0) -#define SEM_SIGNAL(s) sem_post(&s) -#define SEM_WAIT(s) sem_wait(&s) -#endif - -/************ forward declarations **************/ - -#ifdef UNIX -/* real-time flag, true if priority boosted */ -extern int sys_hipriority; #endif /* get a garray's "array" structure. */ @@ -206,7 +160,7 @@ static void sndfiler_start_thread(void) /* 1mb of stack should be enough */ pthread_attr_setstacksize(&sf_attr,1048576); - + #ifdef UNIX if (sys_hipriority == 1/* && getuid() == 0 */) { @@ -252,18 +206,15 @@ static t_int sndfiler_synchonize(t_int * w); static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv) { - int i, j; + int i, j, lib; int channel_count; t_float** helper_arrays; int resize = 0; - int seek = 0, arraysize = 0, writesize; + int seek = 0, arraysize = 0; t_symbol* file; t_garray ** arrays; - SNDFILE* sndfile; - SF_INFO info; - // parse flags while (argc > 0 && argv->a_type == A_SYMBOL && *argv->a_w.w_symbol->s_name == '-') @@ -276,9 +227,10 @@ static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv) } else if (!strcmp(flag, "skip")) { - if (argc < 2 || argv[1].a_type != A_FLOAT || - ((seek = argv[1].a_w.w_float) == 0)) + if (argc < 2 || argv[1].a_type != A_FLOAT) goto usage; + else + seek = argv[1].a_w.w_float; argc -= 2; argv += 2; } else goto usage; @@ -323,85 +275,23 @@ static void sndfiler_read_cb(t_sndfiler * x, int argc, t_atom* argv) } arraysize = size; } - - sndfile = sf_open(file->s_name, SFM_READ, &info); - if (sndfile) + lib = check_fileformat(file); + if(lib == USE_LIBSNDFILE) + arraysize = read_libsndfile(helper_arrays, channel_count, seek, + resize, arraysize, file); + else if(lib == USE_LIBVORBISFILE) + arraysize = read_libvorbisfile(helper_arrays, channel_count, seek, + resize, arraysize, file); + else { - int pos = 0; - int maxchannels = (channel_count < info.channels) ? - channel_count : info.channels; + pd_error(x, "Error opening file"); + return; + } - t_float * item = alloca(maxchannels * sizeof(t_float)); - + if(arraysize > 0) + { t_int ** syncdata = getbytes(sizeof(t_int*) * 5); - - // negative seek: offset from the end of the file - if(seek<0) - { - pos = sf_seek(sndfile, seek, SEEK_END); - } - if(seek>0) - { - pos = sf_seek(sndfile, seek, SEEK_SET); - } - if(pos == -1) - { - pd_error(x, "invalid seek in soundfile"); - return; - } - - if(resize) - { - writesize = (info.frames-pos); - arraysize = writesize; - } - else - writesize = (arraysize>(info.frames-pos)) ? - info.frames-pos : arraysize; - -#if (_POSIX_MEMLOCK - 0) >= 200112L - munlockall(); -#endif - - for (i = 0; i != channel_count; ++i) - { - helper_arrays[i] = getalignedbytes(arraysize * sizeof(t_float)); - } - - for (i = 0; i != writesize; ++i) - { - sf_read_float(sndfile, item, info.channels); - - for (j = 0; j != info.channels; ++j) - { - if (j < channel_count) - { - helper_arrays[j][i] = item[j]; - } - } - } - - // fill remaining elements with zero - if(!resize && (arraysize>(info.frames-pos))) - { - for (i = writesize; i != arraysize; ++i) - { - for (j = 0; j != info.channels; ++j) - { - if (j < channel_count) - { - helper_arrays[j][i] = 0; - } - } - } - } - -#if (_POSIX_MEMLOCK - 0) >= 200112L - mlockall(MCL_FUTURE); -#endif - - sf_close(sndfile); syncdata[0] = (t_int*)arrays; syncdata[1] = (t_int*)helper_arrays; -- cgit v1.2.1 From 6c03ffeef182c00462a6d0375ed81dc0d9983124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Thu, 19 Jun 2008 13:50:58 +0000 Subject: removed the svn:executable bit for code, patches and text svn path=/trunk/externals/tb/; revision=10048 --- sndfiler/src/sndfiler.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 sndfiler/src/sndfiler.c (limited to 'sndfiler/src/sndfiler.c') diff --git a/sndfiler/src/sndfiler.c b/sndfiler/src/sndfiler.c old mode 100755 new mode 100644 -- cgit v1.2.1