freecycle-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Freecycle-users] cpu usage


From: mickski56
Subject: [Freecycle-users] cpu usage
Date: Thu, 17 Sep 2009 21:14:28 +0100

Is it expected behaviour for freecycle to use 100% cpu with a wave file
opened. But not playing ?

I have also found this little patch usefull as my midi keyboard doesn't
emit note off but note on with velocity 0

--- alsaseqmidiinput.cpp  2006-03-20 16:13:12.000000000 +0000
+++ alsaseqmidiinput.cpp        2009-09-17 17:32:02.000000000 +0100
@@ -114,14 +114,19 @@
     snd_seq_event_t* ev;
     do {
         if(snd_seq_event_input(seq_handle, &ev)>=0){
            //printMessage(*(ev->data.raw32.d));
             if(ev->type==SND_SEQ_EVENT_STOP){
                 soundPlayer->setPlaying(FALSE);
                 cout<<"stop received\n";
             }else if(ev->type==SND_SEQ_EVENT_NOTEON ||
ev->type==SND_SEQ_EVENT_NOTEOFF){ if(ev->type==SND_SEQ_EVENT_NOTEON){
-                    playNote(ev->data.note.note);
+                   if(ev->data.note.velocity > 0){
+                    playNote(ev->data.note.note);
                     currently_playing=ev->data.note.note;
+                   }else {
+                    if (currently_playing==ev->data.note.note)
soundPlayer->setPlaying(FALSE);
+                   } 
                 }else if(ev->type==SND_SEQ_EVENT_NOTEOFF){
                     if (currently_playing==ev->data.note.note)
soundPlayer->setPlaying(FALSE); }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]