static void ADD_UNDO_FUNC(PatchVoice( struct Tracker_Windows *window, struct WBlocks *wblock, struct Patch *patch, int voicenum ) ) { struct Undo_PatchVoice *undo_ae=talloc(sizeof(struct Undo_PatchVoice)); undo_ae->patch = patch; undo_ae->voicenum = voicenum; undo_ae->voice = patch->voices[voicenum]; printf("********* Storing patchvoice undo. Value: %d\n",undo_ae->voice.is_on); Undo_Add_dont_stop_playing( window->l.num, wblock->l.num, wblock->wtrack->l.num, wblock->curr_realline, undo_ae, Undo_Do_PatchVoice, "Patch voice" ); }
static void Undo_ChipPos( struct Tracker_Windows *window, struct WBlocks *wblock, struct Patch *patch ) { struct Undo_ChipPos *undo_ae=talloc(sizeof(struct Undo_ChipPos)); undo_ae->patch = patch; undo_ae->x = CHIP_get_pos_x(patch); undo_ae->y = CHIP_get_pos_y(patch); printf("********* Storing chipos undo. value: %f\n",undo_ae->x); Undo_Add_dont_stop_playing( window->l.num, wblock->l.num, wblock->wtrack->l.num, wblock->curr_realline, undo_ae, Undo_Do_ChipPos, talloc_format("Chip position %s",patch->name) ); }
static void Undo_AudioEffect( struct Tracker_Windows *window, struct WBlocks *wblock, struct Patch *patch, int effect_num ) { struct Undo_AudioEffect *undo_ae=talloc(sizeof(struct Undo_AudioEffect)); SoundPlugin *plugin = patch->patchdata; undo_ae->patch = patch; undo_ae->effect_num = effect_num; undo_ae->value = plugin->savable_effect_values[effect_num]; printf("********* Storing eff undo. value: %f %d\n",undo_ae->value,plugin->comp.is_on); Undo_Add_dont_stop_playing( window->l.num, wblock->l.num, wblock->wtrack->l.num, wblock->curr_realline, undo_ae, Undo_Do_AudioEffect ); }
static void Undo_InstrumentsWidget( struct Tracker_Windows *window, struct WBlocks *wblock ){ Undo_Add_dont_stop_playing( window->l.num, wblock->l.num, wblock->wtrack->l.num, wblock->curr_realline, create_instruments_widget_state(), Undo_Do_InstrumentsWidget ); }
static void Undo_MixerConnections( struct Tracker_Windows *window, struct WBlocks *wblock ){ //struct Undo_MixerConnections *u_rt=talloc(sizeof(struct Undo_MixerConnections)); //u_rt->reltempomax=wblock->reltempomax; Undo_Add_dont_stop_playing( window->l.num, wblock->l.num, wblock->wtrack->l.num, wblock->curr_realline, MW_get_connections_state(NULL), Undo_Do_MixerConnections, "Mixer connections" ); }
void Undo_TrackHeader( struct Tracker_Windows *window, struct Blocks *block, struct Tracks *track, int realline ){ struct Undo_TrackHeader *u_th=talloc_atomic(sizeof(struct Undo_TrackHeader)); u_th->volume=track->volume; u_th->pan=track->pan; u_th->volumeonoff=track->volumeonoff; u_th->panonoff=track->panonoff; Undo_Add_dont_stop_playing( window->l.num, block->l.num, track->l.num, realline, u_th, Undo_Do_TrackHeader ); }
static void Undo_Sample( struct Tracker_Windows *window, struct WBlocks *wblock, struct Patch *patch ) { struct Undo_Sample *undo_ae=talloc(sizeof(struct Undo_Sample)); SoundPlugin *plugin = patch->patchdata; undo_ae->patch = patch; undo_ae->state = HASH_create(3); plugin->type->create_state(plugin,undo_ae->state); Undo_Add_dont_stop_playing( window->l.num, wblock->l.num, wblock->wtrack->l.num, wblock->curr_realline, undo_ae, Undo_Do_Sample ); }