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

Monty xiphmont at xiph.org
Thu Oct 2 10:08:49 PDT 2003



xiphmont    03/10/02 13:08:49

  Modified:    .        soundboard.c
  Log:
  Added readahead caching via mlock, improved realtime performace via
  realtime scheduling.  Replaced master_mutex locking with atomic
  sections; ONLY WORKS ON UNIPROCESSOR, b ut on uniprocessor, it removes
  the large latency hits playback suffers when a non-realtime thread
  grabbed master_mutex and was preempted.

Revision  Changes    Path
1.12      +8 -8      MTG/soundboard.c

Index: soundboard.c
===================================================================
RCS file: /usr/local/cvsroot/MTG/soundboard.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- soundboard.c	13 Dec 2002 03:11:30 -0000	1.11
+++ soundboard.c	2 Oct 2003 17:08:48 -0000	1.12
@@ -97,7 +97,7 @@
 
 /******** channel mappings.  All hardwired for now... ***********/
 // only OSS stereo builin for now
-#define MAX_OUTPUT_CHANNELS 2
+#define MAX_OUTPUT_CHANNELS 6
 #define MAX_FILECHANNELS 2
 #define CHANNEL_LABEL_LENGTH 50
 int playback_bufsize=0;
@@ -109,12 +109,12 @@
 } outchannel;
   
 static outchannel channel_list[MAX_OUTPUT_CHANNELS]={
-  {"house front left",0},
-  {"house front right",0},
-  {"house rear left",0},
-  {"house rear right",0},
-  {"five",0},
-  {"six",0},
+  {"house left",0},
+  {"house right",0},
+  {"stage left",0},
+  {"stage right",0},
+  {"rear left",0},
+  {"rear right",0},
 };
 static outchannel rchannel_list[2]={
   {"left",0},
@@ -3016,7 +3016,7 @@
     exit(1);
   }
 
-  playfd=fopen("/dev/dsp","wb");
+  playfd=fopen("/dev/dsp1","wb");
   if(!playfd){
     fprintf(stderr,"unable to open audio device for playback: %s.\n",strerror(errno));
     fprintf(stderr,"\nPress enter to continue\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