aboutsummaryrefslogtreecommitdiff
path: root/pd/portaudio
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2005-11-06 01:49:43 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2005-11-06 01:49:43 +0000
commitd07b14f65ef68368d6434f7d0d33892863db84c7 (patch)
tree6f4d23d006fd43e72fdc0cab0618d1788687f110 /pd/portaudio
parent62e46e35ccb9af60be1c3aceb0c263546930ccfe (diff)
fixed memory leak in pa_mac_core.c and the bug sending "bang" to "t s" object
svn path=/trunk/; revision=3842
Diffstat (limited to 'pd/portaudio')
-rw-r--r--pd/portaudio/pa_mac_core/pa_mac_core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pd/portaudio/pa_mac_core/pa_mac_core.c b/pd/portaudio/pa_mac_core/pa_mac_core.c
index e2b4fa8c..77451a5d 100644
--- a/pd/portaudio/pa_mac_core/pa_mac_core.c
+++ b/pd/portaudio/pa_mac_core/pa_mac_core.c
@@ -465,6 +465,7 @@ static OSStatus AudioIOProc( AudioDeviceID inDevice,
CopyOutputData(outOutputData, clientData, frameCount);
}
+ PaUtil_FreeMemory(timeInfo);
PaUtil_EndCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer, frameCount );
if (result == paComplete || result == paAbort) {
@@ -493,6 +494,7 @@ static OSStatus AudioInputProc( AudioDeviceID inDevice,
CopyInputData(clientData, inInputData, frameCount);
clientData->callback(clientData->inputBuffer, NULL, frameCount, timeInfo, paNoFlag, clientData->userData);
+ PaUtil_FreeMemory(timeInfo);
PaUtil_EndCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer, frameCount );
}
@@ -516,7 +518,7 @@ static OSStatus AudioOutputProc( AudioDeviceID inDevice,
clientData->callback(NULL, clientData->outputBuffer, frameCount, timeInfo, paNoFlag, clientData->userData);
CopyOutputData(outOutputData, clientData, frameCount);
-
+ PaUtil_FreeMemory(timeInfo);
PaUtil_EndCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer, frameCount );
}
@@ -665,8 +667,8 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
clientData->inputChannelCount = inputParameters->channelCount;
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];
clientData->outputConverter = PaUtil_SelectConverter(outputParameters->sampleFormat, paFloat32, streamFlags);
@@ -679,9 +681,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
if (inputParameters == NULL || outputParameters == NULL || stream->inputDevice == stream->outputDevice) {
AudioDeviceID device = (inputParameters == NULL) ? stream->outputDevice : stream->inputDevice;
- int e2 = AudioDeviceAddIOProc(device, AudioIOProc, clientData);
- fprintf(stderr, "AudioDeviceAddIOProc %d\n", e2);
-
+ AudioDeviceAddIOProc(device, AudioIOProc, clientData);
}
else {
// using different devices for input and output