[SCM] zynaddsubfx/master: Sync src/main.cpp with 'upstream'

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Fri Aug 3 19:50:11 UTC 2012


The following commit has been merged in the master branch:
commit d736f4def3a4647564e5e3866bf94e0eca39dc53
Author: Alessio Treglia <alessio at debian.org>
Date:   Fri Aug 3 21:49:32 2012 +0200

    Sync src/main.cpp with 'upstream'
    
    Git-Dch: Ignore

diff --git a/src/main.cpp b/src/main.cpp
index 0082b40..22a5836 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -85,131 +85,8 @@ void exitprogram();
 //cleanup on signaled exit
 void sigterm_exit(int /*sig*/)
 {
-<<<<<<< HEAD
-    REALTYPE outputl[SOUND_BUFFER_SIZE];
-    REALTYPE outputr[SOUND_BUFFER_SIZE];
-
-    set_realtime();
-    while (Pexitprogram==0) {
-        pthread_mutex_lock(&master->mutex);
-        master->AudioOut(outputl,outputr);
-        pthread_mutex_unlock(&master->mutex);
-
-#ifndef NONEAUDIOOUT
-        audioout->OSSout(outputl,outputr);
-#endif
-
-        /** /  	int i,x,x2;
-        	REALTYPE xx,xx2;
-
-            	short int xsmps[SOUND_BUFFER_SIZE*2];
-        	for (i=0;i<SOUND_BUFFER_SIZE;i++){//output to stdout
-        		xx=-outputl[i]*32767;
-        		xx2=-outputr[i]*32767;
-        		if (xx<-32768) xx=-32768;
-        		if (xx>32767) xx=32767;
-        		if (xx2<-32768) xx2=-32768;
-        		if (xx2>32767) xx2=32767;
-        		x=(short int) xx;
-        		x2=(short int) xx2;
-        		xsmps[i*2]=x;xsmps[i*2+1]=x2;
-        		};
-        		write(1,&xsmps,SOUND_BUFFER_SIZE*2*2);
-
-        		/ * */
-    };
-    return(0);
-};
-#endif
-
-/*
- * User Interface thread
- */
-
-
-void *thread3(void *arg)
-{
-#ifndef DISABLE_GUI
-
-#ifdef FLTK_GUI
-    ui->showUI();
-
-    while (Pexitprogram==0) {
-#ifdef USE_LASH
-        string filename;
-        switch (lash->checkevents(filename)) {
-        case LASHClient::Save:
-            ui->do_save_master(filename.c_str());
-            lash->confirmevent(LASHClient::Save);
-            break;
-        case LASHClient::Restore:
-            ui->do_load_master(filename.c_str());
-            lash->confirmevent(LASHClient::Restore);
-            break;
-        case LASHClient::Quit:
-            Pexitprogram = 1;
-        default:
-            break;
-        }
-#endif //USE_LASH
-        Fl::wait();
-    }
-
-#elif defined QT_GUI
-    app = new QApplication(0, 0);
-    ui=new MasterUI(master, 0);
-    ui->show();
-    app->exec();
-#endif //defined QT_GUI
-
-#endif //DISABLE_GUI
-    return(0);
-};
-
-/*
- * Sequencer thread (test)
- */
-void *thread4(void *arg)
-{
-    while (Pexitprogram==0) {
-        int type,par1,par2,again,midichan;
-        for (int ntrack=0;ntrack<NUM_MIDI_TRACKS;ntrack++) {
-            if (master->seq.play==0) break;
-            do {
-                again=master->seq.getevent(ntrack,&midichan,&type,&par1,&par2);
-//		printf("ntrack=%d again=%d\n",ntrack,again);
-                if (type>0) {
-//	    printf("%d %d  %d %d %d\n",type,midichan,chan,par1,par2);
-
-//	if (cmdtype==MidiController) master->SetController(cmdchan,cmdparams[0],cmdparams[1]);
-
-
-
-                    pthread_mutex_lock(&master->mutex);
-                    if (type==1) {//note_on or note_off
-                        if (par2!=0) master->NoteOn(midichan,par1,par2);
-                        else master->NoteOff(midichan,par1);
-                    };
-                    pthread_mutex_unlock(&master->mutex);
-                };
-            } while (again>0);
-
-        };
-//if (!realtime player) atunci fac asta
-//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-#ifdef OS_LINUX
-        usleep(1000);
-#elif OS_WINDOWS
-        Sleep(1);
-#endif
-    };
-
-    return(0);
-};
-=======
     Pexitprogram = 1;
 }
->>>>>>> upstream/2.4.3
 
 /*
  * Program initialisation

-- 
zynaddsubfx packaging



More information about the pkg-multimedia-commits mailing list