[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-dev] change default cue buffer size patch
On 23.11.2013, at 09:01, Lucas Samaruga <samarugalucas@xxxxxxxxx> wrote:
> 2013/11/19 Lucas Samaruga <samarugalucas@xxxxxxxxx>
>
> El nov 19, 2013 6:07 PM, "Julian Rohrhuber" <julian.rohrhuber@xxxxxxxxxxxxxxxxxx> escribió:
>
>
> >
> >
> > On 19.11.2013, at 18:18, Lucas Samaruga <samarugalucas@xxxxxxxxx> wrote:
> >
> > >
> > > > On 18.11.2013, at 22:28, Julian Rohrhuber <julian.rohrhuber@xxxxxxxxxxxxxxxxxx> wrote:
> > > > >
> > > > > So something like:
> > > > >
> > > > > (s.options.blockSize * 2) * 64.rand + 65536;
> > > > >
> > >
> > >
> > > It has to be a power of 2 for sure at least for small buffer sizes.
> > in the helpfile it says it has to be a multiple of the block size. multiples of two wouldn't help as much as multiples of block size.
> >
>
> Appear to be booth, that is what I mean/understand. There is a trick, the data is in different help files.
>
> What I said is wrong. It seems that the diskin note on the bufnum argument is not right.
>
Yes, in the source file it seems to be:
"buffer must be allocated as a multiple of 2*blocksize."
void DiskIn_next(DiskIn *unit, int inNumSamples)
{
GET_BUF_SHARED
if (!bufData || ((bufFrames & ((unit->mWorld->mBufLength<<1) - 1)) != 0)) {
unit->m_framepos = 0;
ClearUnitOutputs(unit, inNumSamples);
return;
}
SETUP_OUT(0)
if (unit->m_framepos >= bufFrames) {
unit->m_framepos = 0;
}
bufData += unit->m_framepos * bufChannels;
// buffer must be allocated as a multiple of 2*blocksize.
if (bufChannels > 2) {
for (int j=0; j<inNumSamples; ++j) {
for (uint32 i=0; i<bufChannels; ++i)
out[i][j] = *bufData++;
}
} else if (bufChannels == 2) {
float *out0 = out[0];
float *out1 = out[1];
for (int j=0; j<inNumSamples; ++j) {
out0[j] = *bufData++;
out1[j] = *bufData++;
}
_______________________________________________
sc-dev mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/