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

more patches for linux-outloud



Hi Raman and all,

the first patch below fixes alsaparams so that it will link.  There are
a couple of issues with it once this is applied which need to be fixed
by someone who knows alsa better than I do.

The second patch is another update to the Makefile.  In my last patch, I
didn't define the CFLAGS and CXXFLAGS correctly, and alsaparams was
depending on the .c file instead of the .o file, which is not correct.

Let me know what you think about these.

Thanks,

William

Index: alsaparams.c
===================================================================
--- alsaparams.c	(revision 6208)
+++ alsaparams.c	(working copy)
@@ -30,7 +30,9 @@
   result = snd_pcm_open(&handle, "default", SND_PCM_STREAM_PLAYBACK, 0);
   if (result < 0) 
     showErrorAndExit(result, "Error: Unable to open PCM device: %s\n");
-  snd_pcm_hw_params_alloca(&params);
+  result = snd_pcm_hw_params_malloc(&params);
+  if (result < 0) 
+    showErrorAndExit(result, "Error: no memory for audio parameters: %s\n");
   result = snd_pcm_hw_params_any(handle, params);
   if (result < 0) 
     showErrorAndExit(result, "Error: Cannot read HW params: %s\n");
Index: Makefile
===================================================================
--- Makefile	(revision 6208)
+++ Makefile	(working copy)
@@ -7,8 +7,8 @@
 
 TCL_VERSION=8.4
 TCL_INCLUDE=/usr/include/tcl$(TCL_VERSION)
-CFLAGS= -g    -O2 -fPIC  -DPIC  -pedantic -ansi -Wall  -Wno-long-long -I$(TCL_INCLUDE)
-CXXFLAGS= $(CFLAGS)
+CFLAGS+= -g    -O2 -fPIC  -DPIC  -pedantic -ansi -Wall  -Wno-long-long -I$(TCL_INCLUDE)
+CXXFLAGS+= -g    -O2 -fPIC  -DPIC  -pedantic -ansi -Wall  -Wno-long-long -I$(TCL_INCLUDE)
 LIBS= -ltcl$(TCL_VERSION) -lasound -ldl    
 
 all:   atcleci.so
@@ -16,8 +16,8 @@
 atcleci.so: langswitch.o atcleci.o
 	$(CXX) -shared -o $@ langswitch.o atcleci.o $(LIBS)
 
-alsaparams: alsaparams.c
-	$(CC) $(CFLAGS) -o $@ $<  -lasound 
+alsaparams: alsaparams.o
+	$(CC) -o $@ $<  -lasound 
 
 clean:
 	rm -f *.so *.o 

Attachment: pgpCn3KazpyzE.pgp
Description: PGP signature



If you have questions about this archive or had problems using it, please send mail to:

priestdo@xxxxxxxxxxx No Soliciting!

Emacspeak List Archive | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998 | Pre 1998

Emacspeak Files | Emacspeak Blog