[PD] please test: threaded soundfiler & garray locks

Tim Blechmann TimBlechmann at gmx.net
Thu Jun 17 01:43:47 CEST 2004


hi carmen,

first of all, thanks for your response!

> d_soundfile.c: In function `open_soundfile':
> d_soundfile.c:247: warning: unused variable `param'
> d_soundfile.c:206: warning: unused variable `format'
this is the original code...

> d_soundfile.c: In function `soundfiler_thread':
> d_soundfile.c:1002: too many arguments to function
> `sched_setscheduler'
hm ... it seems that the windows pthread packages uses another
definition of sched_setscheduler than linux ... i'll look into it
tomorrow... i'm curious how this is handled on osx...

> did i forget a -D er something?
my output is:
tim at laptop:~/pd/pd/src> make
gcc -DPD -DUNIX  -Wall -W -Wstrict-prototypes -Wno-unused
-Wno-parentheses -Wno-switch -march=pentium4 -mmmx -msse -msse2
-mfpmath=sse -O6 -funroll-loops -fomit-frame-pointer -DDL_OPEN
-DPA_USE_OSS -DPA_LITTLE_ENDIAN         -DUSEAPI_OSS        
-I../portaudio/pa_common         -I../portaudio/pablio
-I../portaudio/portmidi-macosx     -fno-strict-aliasing -DUSE_FFTW
-DTHREADED_GUI -DTHREADED_SF -DGARRAY_THREAD_LOCK -D_GNU_SOURCE
-DINSTALL_PREFIX=\"/usr/local\" -I. -c -o ../obj/d_soundfile.o
d_soundfile.c 

i suppose you miss the -Wno-unused

> when you say multithreaded, and i'll confess i haevnt read the source,
> do you mean one secondary thread per object, so if it recieves 32
> messages in quick succesion, its going to do those sequentially, or is
> it goign to launch 32 threads at once? based on the choking-death
> scenario im thinking it is the latter? you would know more than me
> here...i suppose a single detached thread that waits for one file to
> finish before stating another would be the ideal compromise...
i'm using one helper thread that's working on a queue of processes.
these processes will be run sequencial. the queue is not only able to
perform soundfiler operations but all operations that match the api can
be scheduled there. 
for the soundfiler routines (read, write, resize) a new buffer will be
allocated, prepared and after locking the system with sys_lock() the
pointers will be set to the new array.

cheers...

-- 
 Tim                          mailto:TimBlechmann at gmx.de
                              ICQ: 96771783
--
The only people for me are the mad ones, the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn,
burn, like fabulous yellow roman candles exploding like spiders across
the stars and in the middle you see the blue centerlight pop and
everybody goes "Awww!"
                                                          Jack Kerouac





More information about the Pd-list mailing list