SPBRecord bug on OS 10
SPBRecord bug on OS 10
- Subject: SPBRecord bug on OS 10
- From: Chris McKinnon <email@hidden>
- Date: Thu, 28 Feb 2002 12:56:50 -0700
Hi,
I've presented this problem on mac-sound-dev, it apparently is a bug, but I thought I'd try here to see if anyone can suggest a workaround or alternative.
I'm using "SPBRecord" for continuos recording in my Carbon app. Whenever the hardware buffer is full, my "CaptureInterruptRoutine" processes the buffer. My program is an Internet chat program so the interrupt routine is kind of the pulse of my program. This system works on OS 9 but fails on OS 10 (I've tested on 10.1.2 and 10.1.3). The failure is that my interrupt routine is only called once with a "hardwareBufferSize" of 1. Any suggestions would be appreciated,
Thanks,
Chris McKinnon
/* Code */
OSErr StartInterruptRecording(SInt32 refnum)
{
OSErr err;
if (gRecordData.paramBlockPtr != NIL)
{
gRecordData.paramBlockPtr->inRefNum = refnum;
gRecordData.paramBlockPtr->count = 0L;
gRecordData.paramBlockPtr->milliseconds = 0L;
gRecordData.paramBlockPtr->bufferLength = 0L;
gRecordData.paramBlockPtr->bufferPtr = NIL;
gRecordData.paramBlockPtr->completionRoutine = NIL;
gRecordData.paramBlockPtr->interruptRoutine = NewSIInterruptUPP(CaptureInterruptRoutine);
gRecordData.paramBlockPtr->userLong = 0L;
gRecordData.paramBlockPtr->error = noErr;
gRecordData.paramBlockPtr->unused1 = 0;
err = SPBRecord(gRecordData.paramBlockPtr, TRUE);
}
else
err = memFullErr;
return(err);
}
pascal void CaptureInterruptRoutine(SPBPtr inParamPtr, Ptr hardwareBuffer,
SInt16 peakAmplitude, SInt32 hardwareBufferSize)
{
/* Do stuff... */
}
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.