| I wanted to make this change myself when I first implemented the Csound API
years ago, but I didn't want to do the work, especially since I was afraid
of doing the work and then losing it due to inertia in the Csound
development community at that time. So it was easy enough to stick a
reference to Csound into the opcode structure. I think this approach is
logically cleaner and we can perhaps remove the reference from the opcode
structure now.
Original Message:
-----------------
From: steven yi stevenyi@csounds.com
Date: Thu, 06 Jan 2005 22:13:19 -0800
To: csound-dev@eartha.mills.edu
Subject: [CSOUND-DEV:5640] Re: ENVIRON * change
Thanks Michael! I'm still curious as to the explanation behind the
change, but it seems this is the middle of a larger change so I'll wait
to see what happens.
As for Real-Time, I notice that paBlockingWrite changed a bit between
the version just before the one commited with the message "Major Change:
added environ arg to opcodes" and that version. This is the current
version in pa_blocking.c:
void paBlockingWrite(PA_BLOCKING_STREAM *pabs, int bytes, MYFLT *buffer)
{
size_t i;
for (i = 0; i < bytes; i++) {
pabs->actualBuffer[i+pabs->bp] = (float) buffer[i];
}
pabs->bp += bytes;
if (pabs->bp >= pabs->actualBufferSampleCount) {
csoundNotifyThreadLock(pabs->csound, pabs->paLock);
csoundWaitThreadLock(pabs->csound, pabs->clientLock, 100);
memcpy(pabs->actualBuffer,
&pabs->actualBuffer[pabs->actualBufferSampleCount],
(pabs->bp-pabs->actualBufferSampleCount)*sizeof(float));
pabs->bp -= pabs->actualBufferSampleCount;
}
}
and revision 1.17, dated 12/26/04, has:
void paBlockingWrite(PA_BLOCKING_STREAM *pabs, MYFLT *buffer)
{
size_t i;
size_t n;
for (i = 0, n = pabs->actualBufferSampleCount; i < n; i++) {
pabs->actualBuffer[i] = (float)buffer[i];
}
csoundNotifyThreadLock(pabs->csound, pabs->paLock);
csoundWaitThreadLock(pabs->csound, pabs->clientLock, 100);
}
I'm not sure if that's of any help, but I found this code has no
changeLog for it so thought it might be something of a lead.
steven
Michael Gogins wrote:
> I have changed vst4cs, fluid, fluidOpcodes, and Loris. I have not yet
> changed py, but I will.
>
> Real-time audio on the PC is now broken, I have no idea why. Off-line
> rendering works fine.
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ . |