Update of /cvsroot/alsa/alsa-oss
In directory sc8-pr-cvs1:/tmp/cvs-serv22489

Modified Files:
        alsa-oss.c configure.in 
Log Message:
- version change to 1.0.0
- fixes against new PCM API


Index: alsa-oss.c
===================================================================
RCS file: /cvsroot/alsa/alsa-oss/alsa-oss.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- alsa-oss.c  15 Oct 2003 17:06:28 -0000      1.39
+++ alsa-oss.c  5 Nov 2003 11:17:08 -0000       1.40
@@ -199,7 +199,7 @@
                snd_pcm_t *pcm = str->pcm;
                snd_pcm_hw_params_t *hw;
                int err;
-               unsigned int periods_min;
+               unsigned int rate, periods_min;
                if (!pcm)
                        continue;
                str->frame_bytes = snd_pcm_format_physical_width(dsp->format) * 
dsp->channels / 8;
@@ -217,7 +217,8 @@
                err = snd_pcm_hw_params_set_periods_integer(pcm, hw);
                if (err < 0)
                        return err;
-               err = snd_pcm_hw_params_set_rate_near(pcm, hw, dsp->rate, 0);
+               rate = dsp->rate;
+               err = snd_pcm_hw_params_set_rate_near(pcm, hw, &rate, 0);
                assert(err >= 0);
 
                if (str->mmap_buffer) {
@@ -254,15 +255,17 @@
                                if (err < 0)
                                        return err;
                        }
-                       if (dsp->fragshift > 0)
-                               err = snd_pcm_hw_params_set_period_size_near(pcm, hw, 
(1 << dsp->fragshift) / str->frame_bytes, 0);
-                       else {
+                       if (dsp->fragshift > 0) {
+                               snd_pcm_uframes_t s = (1 << dsp->fragshift) / 
str->frame_bytes;
+                               err = snd_pcm_hw_params_set_period_size_near(pcm, hw, 
&s, 0);
+                       } else {
                                snd_pcm_uframes_t s = 16;
                                while (s * 2 < dsp->rate / 4) 
                                        s *= 2;
-                               err = snd_pcm_hw_params_set_period_size_near(pcm, hw, 
s, 0);
+                               err = snd_pcm_hw_params_set_period_size_near(pcm, hw, 
&s, 0);
                        }
-                       assert(err >= 0);
+                       if (err < 0)
+                               return err;
                }
 
                err = snd_pcm_hw_params(pcm, hw);
@@ -272,10 +275,16 @@
                if (debug)
                        snd_pcm_dump_setup(pcm, stderr);
 #endif
-               dsp->rate = snd_pcm_hw_params_get_rate(hw, 0);
+               err = snd_pcm_hw_params_get_rate(hw, &dsp->rate, 0);
+               if (err < 0)
+                       return err;
                dsp->oss_format = alsa_format_to_oss(dsp->format);
-               str->period_size = snd_pcm_hw_params_get_period_size(hw, 0);
-               str->periods = snd_pcm_hw_params_get_periods(hw, 0);
+               err = snd_pcm_hw_params_get_period_size(hw, &str->period_size, 0);
+               if (err < 0)
+                       return err;
+               err = snd_pcm_hw_params_get_periods(hw, &str->periods, 0);
+               if (err < 0)
+                       return err;
                str->buffer_size = str->periods * str->period_size;
                free(str->mmap_areas);
                str->mmap_areas = 0;

Index: configure.in
===================================================================
RCS file: /cvsroot/alsa/alsa-oss/configure.in,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- configure.in        21 Oct 2003 17:43:46 -0000      1.18
+++ configure.in        5 Nov 2003 11:17:08 -0000       1.19
@@ -1,5 +1,5 @@
 AC_INIT(alsa-oss.c)
-AM_INIT_AUTOMAKE(alsa-oss, 0.9.8)
+AM_INIT_AUTOMAKE(alsa-oss, 1.0.0)
 
 AC_PREFIX_DEFAULT(/usr)
 



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to