GNOME Bugzilla – Bug 127984
Compilation error in ext/alsa/gstalsa.c because too many args passed to snd_pcm_hw_params* functions
Last modified: 2004-12-22 21:47:04 UTC
Some of the calls to snd_pcm_hw_params* functions specify the wrong number of parameters. For snd_pcm_hw_params_get_channels_min, the min_rate data is returned rather that setting a passed variable pointer. I have alsa-devel-0.9.0.cvs20020903-178 on the system. Patch attached. Makefile and compiler output: gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I/opt/gnome-2.4/include -I../../gst-libs -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pthread -I/opt/gnome-2.4/include/gstreamer-0.7 -I/opt/gnome-2.4/include/glib-2.0 -I/opt/gnome-2.4/lib/glib-2.0/include -I/opt/gnome-2.4/include/libxml2 -DGST_DISABLE_DEPRECATED -Wall -Werror -DG_DISABLE_DEPRECATED -g -I/opt/gnome-2.4/include -MT libgstalsa_la-gstalsa.lo -MD -MP -MF .deps/libgstalsa_la-gstalsa.Tpo -c gstalsa.c -fPIC -DPIC -o libgstalsa_la-gstalsa.lo gstalsa.c: In function `gst_alsa_get_caps': gstalsa.c:559: too many arguments to function `snd_pcm_hw_params_get_channels_min' gstalsa.c:561: too many arguments to function `snd_pcm_hw_params_get_channels_max' gstalsa.c:567: too many arguments to function `snd_pcm_hw_params_get_rate_min' gstalsa.c:570: too many arguments to function `snd_pcm_hw_params_get_rate_max' cc1: warnings being treated as errors gstalsa.c: In function `gst_alsa_probe_hw_params': gstalsa.c:1052: warning: passing arg 3 of `snd_pcm_hw_params_set_periods_near' makes integer from pointer without a cast gstalsa.c:1054: warning: passing arg 3 of `snd_pcm_hw_params_set_period_size_near' makes integer from pointer without a cast gstalsa.c: In function `gst_alsa_set_hw_params': gstalsa.c:1108: warning: passing arg 3 of `snd_pcm_hw_params_set_periods_near' makes integer from pointer without a cast gstalsa.c:1110: warning: passing arg 3 of `snd_pcm_hw_params_set_period_size_near' makes integer from pointer without a cast
Created attachment 21829 [details] [review] Change how snd_pcm_hw_params* funcs called in ext/alsa/gstalsa.c
You need to upgrade your ALSA devel libraries; apparently the API changed between 0.9.0 and 0.9.1. The plugins compile well with the current ALSA lib version (0.9.8), see http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_8h-source.html for the current function prototype. I'll bump up the ALSA requirement in the configure script. Thanks for reporting this.