hi developers...
i thought a lot about a buffer resizer that uses an own thread. some times ago thomas grill wrote, that it's not sure that this prevents audio dropouts because huge amounts of memory have to be copied... maybe it's a stupid question, but why is that a problem? isn't it possible to create a new (resized) audio array in a seperate thread and edit the pointer to point to the new array. after that you should free the old array...
i'm not that into the structure of pd, that's why i'm asking...
Tim mailto:TimBlechmann@gmx.net ICQ: 96771783 http://www.nyds-exp-discogs.tk -- 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
Hi Tim, as PD is largely not thread-safe, you can only do that if it doesn't interfere with the operation of PD. e.g. a patch may be accessing the buffer as well etc. I'm afraid it's not easy (if possible at all) to introduce thread-locks for the PD buffer stuff. (vasp uses it's own "immediate" dynamic buffers for that and other reasons)
best greetings, Thomas
Am Montag, 07.04.03, um 16:54 Uhr (Europe/Vienna) schrieb Tim Blechmann:
hi developers...
i thought a lot about a buffer resizer that uses an own thread. some times ago thomas grill wrote, that it's not sure that this prevents audio dropouts because huge amounts of memory have to be copied... maybe it's a stupid question, but why is that a problem? isn't it possible to create a new (resized) audio array in a seperate thread and edit the pointer to point to the new array. after that you should free the old array...
i'm not that into the structure of pd, that's why i'm asking...
Tim mailto:TimBlechmann@gmx.net ICQ: 96771783 http://www.nyds-exp-discogs.tk -- 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
PD-dev mailing list PD-dev@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-dev
Hallo, Thomas Grill hat gesagt: // Thomas Grill wrote:
as PD is largely not thread-safe, you can only do that if it doesn't interfere with the operation of PD. e.g. a patch may be accessing the buffer as well etc.
BTW, Thomas: Do you have a simple example about how to check for the cleanness of the flext::buffer in the dsp-function? I.e. if is it still there?
ciao
Am Montag, 07.04.03, um 18:11 Uhr (Europe/Vienna) schrieb Frank Barknecht:
Hallo, Thomas Grill hat gesagt: // Thomas Grill wrote:
as PD is largely not thread-safe, you can only do that if it doesn't interfere with the operation of PD. e.g. a patch may be accessing the buffer as well etc.
BTW, Thomas: Do you have a simple example about how to check for the cleanness of the flext::buffer in the dsp-function? I.e. if is it still there?
Yes, check out the xsample cvs version, main.cpp, function bufchk, line 81 Should be easy to comprehend ;-)
best greetings, Thomas