CFFTOSX::~CFFTOSX() { if (mA.realp) { delete[] mA.realp; delete[] mA.imagp; } if (mFFT) { destroy_fftsetup(mFFT); } }
void __TFWT2D_TransformerRep::discard() { // not critical // have to use free_floats() since we allocated with alloc_floats() if(m_pkrnlmask) { free_floats((float*)m_pkrnlmask); m_pkrnlmask = 0; } if(m_pinpbuf) { free_floats(m_pinpbuf); m_pinpbuf = 0; } if(m_setup) { destroy_fftsetup(m_setup); m_setup = 0; } }
void noisiness_free(t_noisiness *x) { dsp_free((t_pxobject *)x); #ifdef __ALTIVEC__ #pragma altivec_model on if (x->x_A.realp) t_freebytes(x->x_A.realp, x->x_FFTSizeOver2); if (x->x_A.imagp) t_freebytes(x->x_A.imagp, x->x_FFTSizeOver2); if (x->x_setup) destroy_fftsetup(x->x_setup); #pragma altivec_model off #else if (x->memFFT != NULL) DisposePtr((char *) x->memFFT); #endif if (x->Buf1 != NULL) DisposePtr((char *) x->Buf1); if (x->Buf2 != NULL) DisposePtr((char *) x->Buf2); if (x->BufFFT != NULL) DisposePtr((char *) x->BufFFT); if (x->WindFFT != NULL) DisposePtr((char *) x->WindFFT); if (x->x_clock != NULL) freeobject((t_object *)x->x_clock); if (x->BufBark != NULL) DisposePtr((char *) x->BufBark); if (x->BufSizeBark != NULL) DisposePtr((char *) x->BufSizeBark); }
void ivis_close( ITunesVis* plugin ) { if ( plugin != NULL ) { /* destroy FFT setup */ destroy_fftsetup( plugin->fft_setup ); /* send the plugin, visual hide and cleanup messages */ if ( plugin->imports.visual_handler ) { plugin->imports.visual_handler( kVisualPluginStopMessage, NULL, plugin->vis_ref ); plugin->imports.visual_handler( kVisualPluginDisableMessage, NULL, plugin->vis_ref ); plugin->imports.visual_handler( kVisualPluginHideWindowMessage, NULL, plugin->vis_ref ); plugin->imports.visual_handler( kVisualPluginCleanupMessage, NULL, plugin->vis_ref ); } /* send the plugin a cleanup message */ // FIXME: iTunes plugins don't expect to be unloaded until app terminates //if ( plugin->imports.main ) // plugin->imports.main( kPluginCleanupMessage, NULL, plugin->main_ref ); /* free our screen if it was allocated */ if ( plugin->screen ) release_view( plugin->screen ); /* if we have an open handle, then close it */ if ( plugin->handle ) { // FIXME: iTunes plugins don't expect to be unloaded until app terminates //dlclose( plugin->handle ); plugin->handle = NULL; } /* deallocate */ free( plugin ); } }
void pitch_free(t_pitch *x) { dsp_free((t_pxobject *)x); #ifdef __ALTIVEC__ #pragma altivec_model on if (x->x_A.realp) t_freebytes(x->x_A.realp, x->x_FFTSizeOver2); if (x->x_A.imagp) t_freebytes(x->x_A.imagp, x->x_FFTSizeOver2); if (x->x_setup) destroy_fftsetup(x->x_setup); #pragma altivec_model off #else if (x->memFFT != NULL) sysmem_freeptr((char *) x->memFFT); #endif if (x->Buf1 != NULL) sysmem_freeptr((char *) x->Buf1); if (x->Buf2 != NULL) sysmem_freeptr((char *) x->Buf2); if (x->BufFFT != NULL) sysmem_freeptr((char *) x->BufFFT); if (x->BufPower != NULL) sysmem_freeptr((char *) x->BufPower); if (x->WindFFT != NULL) sysmem_freeptr((char *) x->WindFFT); if (x->peakBuf != NULL) sysmem_freeptr((char *) x->peakBuf); if (x->histBuf != NULL) sysmem_freeptr((char *) x->histBuf); if (x->x_clock != NULL) freeobject((t_object *)x->x_clock); }