[commit] r2338 - in trunk/user/rawrec: . src

dslinux_sonny_jim at dslinux.in-berlin.de dslinux_sonny_jim at dslinux.in-berlin.de
Fri Aug 1 15:02:33 CEST 2008


Author: dslinux_sonny_jim
Date: Fri Aug  1 15:02:33 2008
New Revision: 2338

Log:
Rawrec for DSLinux, can be used in a pipe with ivorbisfiexample from oggplay to play .ogg eg: cat test.ogg|ivorbisfileexample|rawplay -c 1 -r 32768

Added:
   trunk/user/rawrec/
      - copied from r2337, /tags/rawrec/rawrec-0.9.991/
   trunk/user/rawrec/Makefile
Modified:
   trunk/user/rawrec/src/Makefile
   trunk/user/rawrec/src/sleep_on_option.c

Modified: trunk/user/rawrec/src/Makefile
==============================================================================
--- /tags/rawrec/rawrec-0.9.991/src/Makefile	(original)
+++ trunk/user/rawrec/src/Makefile	Fri Aug  1 15:02:33 2008
@@ -6,7 +6,7 @@
 HEADERS = $(wildcard *.h)
 OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
 
-CC = gcc
+#CC = gcc
 WARNFLAGS = -Wall -W -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
 DEBUGFLAGS = -O0 -g
 OPTFLAGS = -O2
@@ -16,10 +16,10 @@
 #FANCY_THREAD_DEFINES = -DUSE_FANCY_PRIORITY_CODE
 
 # FIXME: USEBUFFLOCK appears to be historic, and should probably go some day.
-CFLAGS = $(WARNFLAGS) $(OPTFLAGS) $(DEBUGFLAGS) -DUSEBUFFLOCK \
-         $(FANCY_THREAD_DEFINES) -D_REENTRANT -D_GNU_SOURCE \
-         -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-LDFLAGS = -lm -lpthread
+CFLAGS += $(WARNFLAGS) $(OPTFLAGS) $(DEBUGFLAGS) -DUSEBUFFLOCK 
+#         $(FANCY_THREAD_DEFINES) -D_REENTRANT -D_GNU_SOURCE \
+#         -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+LDFLAGS += -lm -lpthread
 
 # The GNU way is just too painful.  I'm not writing three tiers of
 # variables just to get to /usr/local/man/man1.  If it starts to seem 

Modified: trunk/user/rawrec/src/sleep_on_option.c
==============================================================================
--- /tags/rawrec/rawrec-0.9.991/src/sleep_on_option.c	(original)
+++ trunk/user/rawrec/src/sleep_on_option.c	Fri Aug  1 15:02:33 2008
@@ -15,7 +15,7 @@
 
     if ( time > samples / speed ) {
       reqst.tv_sec = (time_t) floor(time);
-      reqst.tv_nsec = (long) nearbyint((time - floor(time)) * 1000000);      
+      reqst.tv_nsec = (long) rint((time - floor(time)) * 1000000);      
     } else {
       reqst.tv_sec = (time_t) floor(samples / speed);
       reqst.tv_nsec = (long) rint((samples / speed - floor(samples / speed))


More information about the dslinux-commit mailing list