[xiph-cvs] cvs commit: MTG soundboard.c

Monty xiphmont at xiph.org
Thu Oct 2 10:14:19 PDT 2003



xiphmont    03/10/02 13:14:19

  Modified:    .        soundboard.c
  Log:
  Add realtime priority to record thread

Revision  Changes    Path
1.14      +11 -1     MTG/soundboard.c

Index: soundboard.c
===================================================================
RCS file: /usr/local/cvsroot/MTG/soundboard.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- soundboard.c	2 Oct 2003 17:11:58 -0000	1.13
+++ soundboard.c	2 Oct 2003 17:14:19 -0000	1.14
@@ -77,7 +77,7 @@
 static char *lockfile="/tmp/beaverphonic/lock";
 //static char *installdir="/usr/local/beaverphonic/";
 static char *installdir="/home/xiphmont/MotherfishCVS/MTG/";
-#define VERSION "$Id: soundboard.c,v 1.13 2003/10/02 17:11:58 xiphmont Exp $"
+#define VERSION "$Id: soundboard.c,v 1.14 2003/10/02 17:14:19 xiphmont Exp $"
 
 enum menutype {MENU_MAIN,MENU_KEYPRESS,MENU_ADD,MENU_EDIT,MENU_OUTPUT,MENU_QUIT};
 
@@ -991,6 +991,16 @@
   int ret;
   audio_buf_info info;
 
+  /* realtime schedule setup */
+  {
+    struct sched_param param;
+    param.sched_priority=89;
+    if(pthread_setschedparam(pthread_self(), SCHED_FIFO, &param)){
+      fprintf(stderr,"Could not set realtime priority for playback; am I suid root?\n");
+      exit(1);
+    }
+  }
+
   ret=ioctl(fd,SNDCTL_DSP_SETFMT,&format);
   if(ret || format!=REC_SAMPLE_FMT){
     fprintf(stderr,"Could not set recording format\n");

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list