void DeleteBlock( NInt blockpos ){ struct Tracker_Windows *window=root->song->tracker_windows; struct WBlocks *wblock; struct Blocks *removed_block=ListFindElement1(&root->song->blocks->l,blockpos); struct Blocks *nextblock=NextBlock(removed_block); ListRemoveElement1(&root->song->blocks,&removed_block->l); { struct Blocks *block = nextblock; while(block!=NULL){ block->l.num--; block=NextBlock(block); } } root->song->num_blocks--; while(window!=NULL){ wblock=ListFindElement1(&window->wblocks->l,blockpos); ListRemoveElement1( &window->wblocks, &wblock->l ); wblock=NextWBlock(wblock); while(wblock!=NULL){ wblock->l.num--; wblock=NextWBlock(wblock); } window=NextWindow(window); } // Call BL_removeBlockFromPlaylist after blocklist is updated. BL_removeBlockFromPlaylist(removed_block); }
int CloseTrackerWindow(NInt place){ struct Tracker_Windows *temp; temp=(struct Tracker_Windows *)ListFindElement1(&root->song->tracker_windows->l,place); if(temp==NULL) return 1; GFX_ShutDownVisual(temp); // temp->wblock=NULL; ListRemoveElement1(&root->song->tracker_windows,&temp->l); return 0; }
void DeleteFxNodeLine(struct WTracks *wtrack, struct FXs *fxs, struct FXNodeLines *fxnodeline){ R_ASSERT(ListFindNumElements3(&fxs->fxnodelines->l)>1); PLAYER_lock();{ ListRemoveElement3(&fxs->fxnodelines,&fxnodeline->l); }PLAYER_unlock(); if (ListFindNumElements3(&fxs->fxnodelines->l) <= 1 ){ PlayStop(); struct FX *fx = fxs->fx; struct Tracks *track = wtrack->track; OS_SLIDER_release_automation_pointers(track->patch,fx->effect_num); (*fx->closeFX)(fx,track); ListRemoveElement1(&track->fxs,&fxs->l); } }
void CloseTrack(struct Blocks *block, NInt tracknum){ struct Tracks *temp=(struct Tracks *)ListFindElement1(&block->tracks->l,tracknum); ListRemoveElement1(&block->tracks,&temp->l); }