freecycle-users
[Top][All Lists]
Advanced

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

Re: [Freecycle-users] cpu usage


From: Predrag Viceic
Subject: Re: [Freecycle-users] cpu usage
Date: Thu, 5 Nov 2009 09:31:39 +0100

Thanks for the patch. I'll commit it ASAP,

Cheers
Predrag

Le Thursday 17 September 2009 22.14:28 mickski56, vous avez écrit :
> 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); }
>
>
>
> _______________________________________________
> Freecycle-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/freecycle-users




reply via email to

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