Hi,

we have finally put our production system to 1.0.0beta1 using alsa without any 
errors anymore.

To close this thread I just want to summarize the needed steps:

1) install the int overflow patch before configure, make, make install

Index: alsa_stubs.c
===================================================================
--- alsa_stubs.c        (révision 7697)
+++ alsa_stubs.c        (copie de travail)
@@ -114,7 +114,11 @@
    return ans;
  }

-static void check_for_err(int ret)
+/* Here, we use the type snd_pcm_sframes_t
+ * which is long usually and makes sure we
+ * avoid long to int overflow in the read/write
+ * function's return value. */
+static void check_for_err(snd_pcm_sframes_t ret)
  {
    if (ret>= 0)
      return;
@@ -296,7 +300,7 @@
    int ofs = Int_val(ofs_);
    snd_pcm_t *handle = Pcm_handle_val(handle_);
    char *buf;
-  int ret;
+  snd_pcm_sframes_t ret;

    if (ofs + len * Frame_size_val(handle_)>  caml_string_length(dbuf))
      caml_invalid_argument("buffer");
@@ -320,7 +324,7 @@
    int ofs = Int_val(ofs_);
    snd_pcm_t *handle = Pcm_handle_val(handle_);
    char *buf;
-  int ret;
+  snd_pcm_sframes_t ret;

    if (ofs + len * Frame_size_val(handle_)>  caml_string_length(sbuf))
      caml_invalid_argument("buffer");
@@ -346,7 +350,7 @@
    snd_pcm_t *handle = Pcm_handle_val(handle_);
    char **buf;
    int c;
-  int ret;
+  snd_pcm_sframes_t ret;

    /* TODO: check the size of dbuf */
    buf = malloc(chans * sizeof(char*));
@@ -377,7 +381,7 @@
    snd_pcm_t *handle = Pcm_handle_val(handle_);
    char **buf;
    int c;
-  int ret;
+  snd_pcm_sframes_t ret;

    /* TODO: check the size of sbuf */
    buf = malloc(chans * sizeof(char*));
@@ -408,7 +412,7 @@
    snd_pcm_t *handle = Pcm_handle_val(handle_);
    float **buf;
    int c, i;
-  int ret;
+  snd_pcm_sframes_t ret;

    /* TODO: check the size of dbuf */
    buf = malloc(chans * sizeof(float*));
@@ -440,7 +444,7 @@
    snd_pcm_t *handle = Pcm_handle_val(handle_);
    float **buf;
    int c, i;
-  int ret;
+  snd_pcm_sframes_t ret;

    /* TODO: check the size of fbuf */
    buf = malloc(chans * sizeof(float*));
@@ -472,7 +476,7 @@
    snd_pcm_t *handle = Pcm_handle_val(handle_);
    double **buf;
    int c, i;
-  int ret;
+  snd_pcm_sframes_t ret;

    /* TODO: check the size of fbuf */
    buf = malloc(chans * sizeof(double*));
@@ -504,7 +508,7 @@
    snd_pcm_t *handle = Pcm_handle_val(handle_);
    double **buf;
    int c, i;
-  int ret;
+  snd_pcm_sframes_t ret;

    /* TODO: check the size of fbuf */
    buf = malloc(chans * sizeof(double*));

2) create a virtual alsa device in

/etc/asound.conf

pcm.liq-test {
         type plug
         slave { pcm "hw:0,0" }
}

3) use the created alsa device in source scripts

   input.alsa(device="pcm.liq-test")

overrun occures at

44100 hz * 16 bit * 2 (stereo)

4294967296÷(44100×16×2)

12*3600 secs =43200 secs










Am 01.10.2010 18:31, schrieb David Baelde:
> Good news! I should have mentioned it earlier, but Romain pointed out
> that my patch is useless. So what really happened is that not using
> alsa-pulse you simply didn't have that weird error. And there was no
> attempt to recover. Hence the signal should be clean.
>
> We could try to re-prepare instead of recovering when such errors
> happen. But, since you are the only one to have experienced it and you
> just found the cause and fixed the problem, we might simply leave our
> code as it is.
>
> Cheers,
>
> David
>


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to