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

Re: [patch] linux-outloud/alsaparams.c compile fix



Here is the patch.

On Thu, Aug 27, 2009 at 05:53:10PM -0500, William Hubbs wrote:
> Hi Raman,
> 
> the attached patch fixes a linker error that happens when you try to
> build alsaparams.
> 
> There are still issues with this program, at least on my system, but it
> compiles and links successfully once this patch is applied.
> 
> William
Index: alsaparams.c
===================================================================
--- alsaparams.c	(revision 6213)
+++ 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 hardware parameters: %s\n");
   result = snd_pcm_hw_params_any(handle, params);
   if (result < 0) 
     showErrorAndExit(result, "Error: Cannot read HW params: %s\n");

Attachment: pgp76ywhhUWQ1.pgp
Description: PGP signature



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

priestdo@cs.vassar.edu No Soliciting!

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

Emacspeak Files | Emacspeak Blog | Search the archive