Added more comments within the text, not just at the end... On Mon, 23 Mar 2009, Eric Miller wrote:
> Hugh Sasse wrote: > > On Mon, 23 Mar 2009, Eric Miller wrote: > > > > > > > Guillaume Ballet wrote: > > > > > > > On Mon, Mar 23, 2009 at 3:32 PM, Eric Miller <[email protected]> > > > > wrote: > > > > > > [...] > > > > > > > Now I'm getting a new error. Perhaps the git version is a bit off. > > > > > Looks > > > > > like a problem with bloopsaphone... > > > > > > > > > > bloopsaphone.c:331: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token > > > > > bloopsaphone.c: In function ‘bloops_play’: I don't think you showed us that. Which line was 331? > > > > > bloopsaphone.c:370: error: ‘bloops_port_callback’ undeclared (first Given that, it looks like way before the bit you quoted... > > > > > use in > > > > > this function) > > > > > bloopsaphone.c:370: error: (Each undeclared identifier is reported > > > > > only > > > > > once > > > > > bloopsaphone.c:370: error: for each function it appears in.) > > > > > bloopsaphone.c:370: warning: passing argument 8 of > > > > > ‘Pa_OpenDefaultStream’ > > > > > from incompatible pointer type > > > > > bloopsaphone.c:370: error: too few arguments to function > > > > > ‘Pa_OpenDefaultStream’ > > > > > bloopsaphone.c: In function ‘bloops_load’: > > > > > > > > > > > > > > > > > > > Doesn't it complain about a missing header file? > > > > > > > > If not, I recall having a problem when trying to compile the > > > > bloopsaphone on BSD because there where two different version of some > > > > library (don't remember which one though, it started with "audio") and > > > > it was using the wrong header. Maybe you should take a look at this. > > > > > > > > Guillaume > > > > > > > > > > > Didn't see any messages about headers. I wonder if the syntax on the > > > parameters is incorrect. Been a really long time since I worked in C so > > > I'm > > > not sure. > > > > > > > Would help to use nl or cat -n so we can see which line numbers are > > which.... > > > > > > > static int bloops_port_callback(const void *inputBuffer, void > > > *outputBuffer, > > > unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo* timeInfo, > > > > > > > What if you change that (read this as if if were a patch): > > - unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo* timeInfo, > > + unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *timeInfo, > > > > > > > PaStreamCallbackFlags statusFlags, void *data) > > > { > > > int i; > > > float *out = (float*)outputBuffer; > > > bloops *B = (bloops *)data; > > > > > > bloops_synth(framesPerBuffer, out); > > > // if (B->play == BLOOPS_PLAY) > > > // else > > > // for(i = 0; i < framesPerBuffer; i++) > > > // *out++ = 0.0f; > > > > > > return paContinue; > > > } > > > > > > > Huh? inputBuffer seems to be unused, including the commented out bits? > > And timeInfo, for that matter. > > > > Hugh > > > Sorry about the line numbers. I'll remember that next time. > > I thought the pointer "*" looked strange. Tried moving it but it still isn't > working. I think this must be a "work in progress". When I looked in more detail I thought "who would write code like this > > > // if (B->play == BLOOPS_PLAY) > > > // else > > > // for(i = 0; i < framesPerBuffer; i++) > > > // *out++ = 0.0f; > > > and not even comment why it is removed?" What's wrong with if (B->play != BLOOPS_PLAY) for(i = 0; i < framesPerBuffer; i++) *out++ = 0.0f; for one thing? And although style quibbles are easy, I always put {} in if and for statements now, so adding code is less error prone. Are there refs to a previous stable version that is worth trying in the meantime? If you can show us the section around 331 the error may be clear. And it might be instructive to turn the warning levels "up to 11" on GCC so anything a bit wobbly earlier shows up. -Wall, I think. > > Thanks for the help. I'll wait a bit and see if it gets updated. > > Eric > > Hugh
