这篇教程C++ sysmem_freeptr函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中sysmem_freeptr函数的典型用法代码示例。如果您正苦于以下问题:C++ sysmem_freeptr函数的具体用法?C++ sysmem_freeptr怎么用?C++ sysmem_freeptr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了sysmem_freeptr函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: match_freebytesvoid match_freebytes(t_match *x){ if (x->m_seen) sysmem_freeptr(x->m_seen);; if (x->m_want) sysmem_freeptr(x->m_want);;}
开发者ID:Cycling74,项目名称:max5-sdk,代码行数:7,
示例2: inquisitor_attributesvoid inquisitor_attributes(t_inquisitor* x){ t_symbol** names = NULL; long count = 0; t_atom* av = NULL; if(!x->subject){ t_object* b = jpatcher_get_firstobject(x->patcher); while(b){ if(x->name == jbox_get_varname(b)){ x->subject = jbox_get_object(b); break; } b = jbox_get_nextobject(b); } } if(x->subject){ object_attr_getnames(x->subject, &count, (t_symbol***)&names); if(count && names){ av = (t_atom*)sysmem_newptr(sizeof(t_atom) * count); for(long i=0; i<count; i++) atom_setsym(av+i, names[i]); outlet_anything(x->outlet_names, atom_getsym(av), count-1, av+1); sysmem_freeptr(av); sysmem_freeptr(names); } }}
开发者ID:imclab,项目名称:TapTools,代码行数:31,
示例3: gendy_freevoid gendy_free(t_gendy *x){ dsp_free((t_pxobject *)x); sysmem_freeptr(x->mMemoryAmp); sysmem_freeptr(x->mMemoryDur); }
开发者ID:alfonso73,项目名称:sc-max,代码行数:7,
示例4: sysmem_freeptr ~gmu_bufgranul() { sysmem_freeptr(linear_interp_table); sysmem_freeptr(gmu_bufgrain::tmp_buffer); delete env_shrbuf_manager; delete spat_class; //critical_exit(0); }
开发者ID:bascouch,项目名称:gmu.objects,代码行数:10,
示例5: FMfreevoid FMfree(fmsynth *x) { if (x->waveTable) sysmem_freeptr(x->waveTable); if (x->waveTable2) sysmem_freeptr(x->waveTable2); if (x->window) sysmem_freeptr(x->window); dsp_free((t_pxobject *)x); //Free the object with Max's routine}
开发者ID:DarienBrito,项目名称:FMgrains-,代码行数:12,
示例6: hub_getstatevoid hub_getstate(t_hub *x){ subscriberList* subscriber = x->subscriber; // head of the linked list subscriberIterator i; t_subscriber* t; char* text = NULL; long textsize = 0; if(!x->textEditor) x->textEditor = (t_object*)object_new(_sym_nobox, _sym_jed, x, 0); if(!x->textSize){ x->textSize = 4096; x->text = (char*)malloc(sizeof(char) * x->textSize); } x->text[0] = 0; critical_enter(0); for(i = subscriber->begin(); i != subscriber->end(); ++i) { t = *i; if(t->type == jps_subscribe_parameter){ long ac = NULL; t_atom* av = NULL; object_attr_getvalueof(t->object, jps_value, &ac, &av); // get atom_gettext(ac, av, &textsize, &text, 0); // this is a really lame way to do this... if(strlen(x->text) > (x->textSize - 1024)){ x->textSize += 4096; x->text = (char*)realloc(x->text, x->textSize); } strncat_zero(x->text, x->osc_name->s_name, x->textSize); strncat_zero(x->text, "/", x->textSize); strncat_zero(x->text, t->name->s_name, x->textSize); strncat_zero(x->text, " ", x->textSize); strncat_zero(x->text, text, x->textSize); strncat_zero(x->text, "/n", x->textSize); sysmem_freeptr(text); text = NULL; textsize = 0; } } critical_exit(0); object_method(x->textEditor, _sym_settext, x->text, _sym_utf_8); object_attr_setchar(x->textEditor, gensym("scratch"), 1); object_attr_setsym(x->textEditor, _sym_title, gensym("jamoma module state")); sysmem_freeptr(text);}
开发者ID:alexarje,项目名称:JamomaModular,代码行数:53,
示例7: scripto_dblclickvoid scripto_dblclick(t_scripto *x){ if (x->s_patcher) object_method(x->s_patcher, gensym("vis")); else { t_dictionary *d = dictionary_new(); char parsebuf[256]; t_atom a; long ac = 0; t_atom *av = NULL; // create a patcher without scroll bars and a toolbar sprintf(parsebuf,"@defrect 0 0 300 400 @title scripto @enablehscroll 0 @enablevscroll 0 @presentation 0 @toolbarid /"/""); atom_setparse(&ac,&av,parsebuf); attr_args_dictionary(d,ac,av); atom_setobj(&a,d); sysmem_freeptr(av); x->s_patcher = (t_object *)object_new_typed(CLASS_NOBOX,gensym("jpatcher"),1, &a); freeobject((t_object *)d); // we created this dictionary and we don't need it anymore object_method(x->s_patcher,gensym("vis")); x->s_ui = newobject_sprintf(x->s_patcher, "@maxclass scripto_ui @patching_rect 0 0 300 400 @oncolor %.2f %.2f %.2f %.2f @offcolor %.2f %.2f %.2f %.2f", x->s_oncolor.red, x->s_oncolor.green, x->s_oncolor.blue, x->s_oncolor.alpha, x->s_offcolor.red, x->s_offcolor.green, x->s_offcolor.blue, x->s_offcolor.alpha); object_attach_byptr_register(x, x->s_ui, CLASS_BOX); // attach our UI object to us object_attach_byptr_register(x, x->s_patcher, CLASS_NOBOX); // attach our UI object to us }}
开发者ID:AlvaroBuitrago,项目名称:max-test,代码行数:27,
示例8: jamoma_class_attr_getvoid jamoma_class_attr_get(t_object *o, t_symbol *attrName, long, t_atom *){ char cAttrName[256]; t_symbol *sAttrName; char *temp; long ac = 0; t_atom *av = NULL; t_jcom_core_subscriber_common *x = (t_jcom_core_subscriber_common*)o; strcpy(cAttrName, attrName->s_name); temp = strrchr(cAttrName, '/'); if(temp) *temp = 0; sAttrName = gensym(cAttrName); object_attr_getvalueof(o, sAttrName, &ac, &av); object_obex_dumpout(o, sAttrName, ac, av); if(x->hub != NULL){ char s[256]; t_atom a[4]; snprintf(s, 256, "%s:/%s", x->attr_name->s_name, attrName->s_name); atom_setsym(a+0, gensym(s)); sysmem_copyptr(av, a+1, sizeof(t_atom) * ac); object_method_typed(x->hub, jps_feedback, ac + 1, a, NULL); } if(ac) sysmem_freeptr(av);}
开发者ID:alexarje,项目名称:JamomaModular,代码行数:30,
示例9: jit_gl_terrain_maxdimt_jit_err jit_gl_terrain_maxdim(t_jit_gl_terrain *x, void *attr, long argc, t_atom *argv){ long temp[2], i,j; float *vertnorms, *posit, *facenorms,*texcoords; if (argc&&argv) { temp[0] = jit_atom_getlong(argv+0); temp[1] = jit_atom_getlong(argv+1); } x->maxdim[0] = CLIP(temp[0], 256, 65535); x->maxdim[1] = CLIP(temp[1], 256, 65535); // replace with resize pointer!! important! and defer mem calling // alloc memory here if (x->posit) { sysmem_freeptr(x->posit); post("just free 'd posit"); } x->posit= sysmem_newptr(x->maxdim[0]*x->maxdim[1]*sizeof(float)); if(x->posit) { post("alloced posit %ld * %ld * %ld /(sizeof/(double/)/) = %ld bytes",x->maxdim[0], x->maxdim[1],sizeof(float),x->maxdim[0]*x->maxdim[1]*sizeof(float)); } else {
开发者ID:imclab,项目名称:a-objects_maxmspjitter_00-07,代码行数:30,
示例10: omax_object_ioReportvoid omax_object_ioReport(t_object *x, t_symbol *msg, int argc, t_atom *argv){ long buflen; char *buf = NULL; if(argc == 0){ t_atom a; atom_setsym(&a, gensym("/*")); omax_object_createIOReport(x, msg, 1, &a, &buflen, &buf); }else{ omax_object_createIOReport(x, msg, argc, argv, &buflen, &buf); } if(!buf){ return; } char bundle[buflen + OSC_HEADER_SIZE]; osc_bundle_s_setBundleID(bundle); memcpy(bundle + OSC_HEADER_SIZE, buf, buflen); void *outlet = omax_object_getInfoOutlet(x); if(outlet){ t_atom out[2]; atom_setlong(out, buflen + OSC_HEADER_SIZE); atom_setlong(out + 1, (long)bundle); outlet_anything(outlet, gensym("FullPacket"), 2, out); } if(buf){ sysmem_freeptr(buf); }}
开发者ID:CNMAT,项目名称:libomax,代码行数:29,
示例11: uwemsp_freevoid uwemsp_free(t_uwemsp *x){ dsp_free((t_pxobject *)x); // needs to be called for MSP objects on free // delete our array of signal pointers sysmem_freeptr(x->u_buffers);}
开发者ID:0x4d52,项目名称:ugen,代码行数:7,
示例12: in_dsp// DSP Methodvoid in_dsp(TTPtr self, t_signal **sp, short *count){ WrappedModularInstancePtr x = (WrappedModularInstancePtr)self; TTInputPtr anInput = (TTInputPtr)x->wrappedObject; void** audioVectors = NULL; TTUInt16 vectorSize = 0; if (anInput) { audioVectors = (void**)sysmem_newptr(sizeof(void*) * 3); audioVectors[0] = x; if (count[0] || count[1]) { if (sp[0]->s_n > vectorSize) vectorSize = sp[0]->s_n; audioVectors[1] = sp[0]->s_vec; audioVectors[2] = sp[1]->s_vec; } // set signal numChannels and vectorSize anInput->mSignalIn->setAttributeValue(kTTSym_numChannels, 1); anInput->mSignalOut->setAttributeValue(kTTSym_numChannels, 1); anInput->mSignalIn->setAttributeValue(kTTSym_vectorSize, vectorSize); anInput->mSignalOut->setAttributeValue(kTTSym_vectorSize, vectorSize); // anInput->mSignalIn will be set in the perform method anInput->mSignalOut->sendMessage(kTTSym_alloc); dsp_addv(in_perform, 3, audioVectors); sysmem_freeptr(audioVectors); }}
开发者ID:thorangutang,项目名称:JamomaMax,代码行数:34,
示例13: curvesmooth_free//this gets called when an object is destroyed. do stuff here if you need to clean up.void curvesmooth_free(t_curvesmooth *x){ int i; //gotta call this one, *before* you free other resources! thanks to Rob Sussman for pointing this out to me. dsp_free((t_pxobject *)x); for(i=0;i<TABLE_SIZE;i++) { if (x->s_table_k_exp[i]) //t_freebytes(x->s_table_k_exp[i], TABLE_SIZE*sizeof(double)); sysmem_freeptr(x->s_table_k_exp[i]); if (x->s_table_k_log[i]) //t_freebytes(x->s_table_k_log[i], TABLE_SIZE*sizeof(double)); sysmem_freeptr(x->s_table_k_log[i]); }}
开发者ID:Cycling74,项目名称:percolate,代码行数:17,
示例14: FLEXT_TEMPIMPLFLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_root))::FreeAligned(void *blk){ FLEXT_ASSERT(blk); char *ori = *(char **)((char *)blk-sizeof(size_t)-sizeof(char *)); size_t bytes = *(size_t *)((char *)blk-sizeof(size_t)); if(UNLIKELY(bytes >= LARGEALLOC)) {#if FLEXT_SYS == FLEXT_SYS_MAX && defined(_SYSMEM_H_) sysmem_freeptr(ori);#else // use C library function for large memory blocks free(ori);#endif } else { //! We need system locking here for secondary threads! SYSLOCK();#if defined(FLEXT_USE_CMEM) free(ori);#else freebytes(ori,bytes);#endif SYSUNLOCK(); }}
开发者ID:Angeldude,项目名称:pd,代码行数:27,
示例15: wrappedModularClass_setAttributeTTErr wrappedModularClass_setAttribute(TTPtr self, t_symbol *s, long argc, const t_atom *argv){ WrappedModularInstancePtr x = (WrappedModularInstancePtr)self; TTValue inputValue, outputValue; TTSymbol ttName; TTAttributePtr anAttribute= NULL; long ac = 0; t_atom *av = NULL; TTErr err; err = selectedObject->findAttribute(TTSymbol(s->s_name), &anAttribute); if (!err) { // set attribute's value if (argc && argv) { jamoma_ttvalue_from_Atom(inputValue, _sym_nothing, argc, argv); selectedObject->setAttributeValue(TTSymbol(s->s_name), inputValue); } // or get it and dumpout his value else { selectedObject->getAttributeValue(TTSymbol(s->s_name), outputValue); jamoma_ttvalue_to_Atom(outputValue, &ac, &av); object_obex_dumpout(self, s, ac, av); sysmem_freeptr(av); } } return err;}
开发者ID:EQ4,项目名称:JamomaMax,代码行数:30,
示例16: dbviewer_notifyt_max_err dbviewer_notify(t_dbviewer *x, t_symbol *s, t_symbol *msg, void *sender, void *data){ if(sender == x->d_view){ if(msg == ps_dbview_update){ dbviewer_bang(x); } else if(msg == ps_dbview_query_changed){ // dump all of the columns t_object *column = NULL; t_symbol **column_names = NULL; long numcolumns = 0; long i; hashtab_getkeys(x->d_columns, &numcolumns, &column_names); if(column_names){ for(i=0; i<numcolumns; i++){ column = jdataview_getnamedcolumn(x->d_dataview, column_names[i]); if(column) jdataview_deletecolumn(x->d_dataview, column); } sysmem_freeptr(column_names); } hashtab_clear(x->d_columns); } else if(msg == _sym_free){ object_detach_byptr((t_object *)x, x->d_view); x->d_view = NULL; } } return jbox_notify((t_jbox*)x, s, msg, sender, data);}
开发者ID:pukulsesuatu,项目名称:max6-sdk,代码行数:30,
示例17: PackDsp// DSP Methodvoid PackDsp(PackPtr self, t_signal** sp, short* count){ TTUInt16 i, k=0; void **audioVectors = NULL; TTUInt16 highestIndexForConnectedSignal = 0; self->vectorSize = sp[0]->s_n; // Setup the perform method audioVectors = (void**)sysmem_newptr(sizeof(void*) * (self->maxNumChannels + 1)); audioVectors[k] = self; k++; self->numChannels = 0; for (i=0; i < self->maxNumChannels; i++) { self->numChannels++; audioVectors[k] = sp[i]->s_vec; k++; if (count[i]) highestIndexForConnectedSignal = i; } self->audioGraphObject->setOutputNumChannels(0, highestIndexForConnectedSignal+1); self->audioGraphObject->getUnitGenerator()->setAttributeValue(kTTSym_vectorSize, (uint)self->vectorSize); self->audioGraphObject->getUnitGenerator()->setAttributeValue(kTTSym_maxNumChannels, (uint)self->maxNumChannels); self->audioGraphObject->getUnitGenerator()->setAttributeValue(kTTSym_sampleRate, (uint)sp[0]->s_sr); dsp_addv(PackPerform, k, audioVectors); sysmem_freeptr(audioVectors);}
开发者ID:thorangutang,项目名称:JamomaMax,代码行数:31,
示例18: pictmeter_doreadvoid pictmeter_doread(t_pictmeter *x, t_symbol *s, long argc, t_atom *argv){ char filename[MAX_PATH_CHARS]; t_fourcc *type, outtype; long ntype; t_max_err err; char alloc; short path; t_jsurface *surface; jgraphics_getfiletypes(x, &ntype, &type, &alloc); if (s == gensym("")) { err = open_dialog(filename, &path, &outtype, type, ntype); if (err) return; } else { strcpy(filename,s->s_name); err = locatefile_extended(filename, &path, &outtype, type, ntype); if (err) return; } surface = jgraphics_image_surface_create_referenced(filename, path); if (surface) x->p_surface = surface; if (alloc) sysmem_freeptr((char *)type);}
开发者ID:AlvaroBuitrago,项目名称:max-test,代码行数:27,
|