Example #1
0
static void cleanup_plugin_data(SoundPlugin *plugin){
  int i;
  Data *data = static_cast<Data*>(plugin->data);

  if(!strcmp(plugin->type->name,"System Out") || !strcmp(plugin->type->name,"System Out 8")){
    struct SoundPlugin *other_system_out = MIXER_get_soundplugin("Jack", "System Out");
    if (other_system_out != NULL){
      GFX_OS_set_system_volume_plugin(other_system_out);
    } else {
      struct SoundPlugin *other_system_out = MIXER_get_soundplugin("Jack", "System Out 8");
      GFX_OS_set_system_volume_plugin(other_system_out);
    }
  }

  for(i=0;i<plugin->type->num_outputs;i++)
    if(data->input_ports[i]!=NULL)
      jack_port_unregister(data->client,data->input_ports[i]);

  for(i=0;i<plugin->type->num_inputs;i++)
    if(data->output_ports[i]!=NULL)
      jack_port_unregister(data->client,data->output_ports[i]);

  V_free(data->input_ports);
  V_free(data->output_ports);

  V_free(data);
}
Example #2
0
void free_player( Player *p ) {
	destroy_bitmap( p->still_image );
	destroy_bitmap( p->ducking_image );
	destroy_bitmap( p->jumping_image );
	destroy_bitmap( p->attack_image );
	V_free( p->moving_images );
	V_free( p->item_animation );
	V_register_del_func( p->inventory, (VectorFunc)free_item );
	V_free( p->inventory );
	IA_free( p->quantity );
	free( p );
}
Example #3
0
void V_entityclose()
{
	if(dsc)
		V_free(dsc);
	if(vao)
	{
		glDeleteVertexArrays(ENT_CNT, vao);
		V_free(vao);
	}
	if(f1)
		V_free(f1);
	if(f2)
		V_free(f2);
	dsc = '\0';
	vao = f1 = f2 = '\0';
}
Example #4
0
// Called from OpenGL thread
SharedVariables::~SharedVariables(){
  V_free(realline_places);
  {
    radium::ScopedMutex locker(&vector_mutex);
    VECTOR_remove(&g_times_storage, times);
  }
}
Example #5
0
static void cleanup_plugin_data(SoundPlugin *plugin){
  int i;
  Data *data = plugin->data;

  if(!strcmp(plugin->type->name,"System Out")) {
    system_out = NULL;
    GFX_OS_set_system_volume_peak_pointers(NULL, plugin->type->num_inputs);
  }

  for(i=0;i<plugin->type->num_outputs;i++)
    if(data->input_ports[i]!=NULL)
      jack_port_unregister(data->client,data->input_ports[i]);

  for(i=0;i<plugin->type->num_inputs;i++)
    if(data->output_ports[i]!=NULL)
      jack_port_unregister(data->client,data->output_ports[i]);

  V_free(data->input_ports);
  V_free(data->output_ports);

  V_free(data);
}
Example #6
0
    void timerEvent(QTimerEvent * e){
      printf("clicked: %p\n", parent->msgBox->clickedButton());

      if (parent->msgBox->clickedButton()!=NULL){
        SOUNDFILESAVER_request_stop();

        // Reset clickedButton().
        delete parent->msgBox;
        parent->msgBox = new MyQMessageBox;
      }
      
      const char *message = ATOMIC_GET(async_message);
      if(message != NULL){
        
        ATOMIC_SET(async_message, NULL);

        MIXER_request_stop_saving_soundfile(); // This is very messy. The code would be far simpler if jack_set_freewheel could be called from any thread.

        //usleep(1000*100); // Wait a bit for saving to stop;

        ScrollEditorToRealLine_CurrPos(root->song->tracker_windows, root->song->tracker_windows->wblock->bot_realline);
        root->song->tracker_windows->must_redraw = true;
#if 0        
        MyQMessageBox msgBox;
        
        msgBox->setText(QString(message));
        //msgBox->setInformativeText(message);
        msgBox->setStandardButtons(QMessageBox::Ok);

        safeExec(msgBox);
#endif

        bool was_cancelled = !strcmp(message, "Cancelled");
        
        V_free((void*)message);

        stop();

        parent->clean_prev();
        
        if (was_cancelled)
          PlayStop(); // Sometimes it continues playing after pressing "cancel".
        else
          parent->save_next();
      }
    }
Example #7
0
static void cleanup_plugin_data(SoundPlugin *plugin){
  printf(">>>>>>>>>>>>>> Cleanup_plugin_data called for %p\n",plugin);
  V_free(plugin->data);
}
Example #8
0
static void cleanup_plugin_data(SoundPlugin *plugin){
  V_free(plugin->data);
}