Update of /cvsroot/pure-data/pd/portaudio/pa_mac_core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31561/pd/portaudio/pa_mac_core
Modified Files:
pa_mac_core.c
Log Message:
fixed memory leak in pa_mac_core.c and the bug sending "bang" to "t s" object
Index: pa_mac_core.c
===================================================================
RCS file: /cvsroot/pure-data/pd/portaudio/pa_mac_core/pa_mac_core.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** pa_mac_core.c 15 Oct 2005 23:14:28 -0000 1.10
--- pa_mac_core.c 6 Nov 2005 01:49:43 -0000 1.11
***************
*** 466,469 ****
--- 466,470 ----
}
+ PaUtil_FreeMemory(timeInfo);
PaUtil_EndCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer, frameCount );
***************
*** 494,497 ****
--- 495,499 ----
clientData->callback(clientData->inputBuffer, NULL, frameCount, timeInfo, paNoFlag, clientData->userData);
+ PaUtil_FreeMemory(timeInfo);
PaUtil_EndCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer, frameCount );
}
***************
*** 517,521 ****
CopyOutputData(outOutputData, clientData, frameCount);
!
PaUtil_EndCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer, frameCount );
}
--- 519,523 ----
CopyOutputData(outOutputData, clientData, frameCount);
! PaUtil_FreeMemory(timeInfo);
PaUtil_EndCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer, frameCount );
}
***************
*** 666,671 ****
clientData->inputSampleFormat = inputParameters->sampleFormat;
err = SetUpUnidirectionalStream(stream->inputDevice, sampleRate, framesPerBuffer, 1);
- fprintf(stderr, "error %d (%d)\n", err, paNoError);
}
if (err == paNoError && outputParameters != NULL) {
stream->outputDevice = macCoreHostApi->macCoreDeviceIds[outputParameters->device];
--- 668,673 ----
clientData->inputSampleFormat = inputParameters->sampleFormat;
err = SetUpUnidirectionalStream(stream->inputDevice, sampleRate, framesPerBuffer, 1);
}
+
if (err == paNoError && outputParameters != NULL) {
stream->outputDevice = macCoreHostApi->macCoreDeviceIds[outputParameters->device];
***************
*** 680,686 ****
AudioDeviceID device = (inputParameters == NULL) ? stream->outputDevice : stream->inputDevice;
! int e2 = AudioDeviceAddIOProc(device, AudioIOProc, clientData);
! fprintf(stderr, "AudioDeviceAddIOProc %d\n", e2);
!
}
else {
--- 682,686 ----
AudioDeviceID device = (inputParameters == NULL) ? stream->outputDevice : stream->inputDevice;
! AudioDeviceAddIOProc(device, AudioIOProc, clientData);
}
else {