[gstreamer-bugs] [Bug 538068] New: oss audio works very poorly with variable rate devices

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Thu Jun 12 15:00:14 PDT 2008


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=538068

  GStreamer | gst-plugins-good | Ver: 0.10.19
           Summary: oss audio works very poorly with variable rate devices
           Product: GStreamer
           Version: 0.10.19
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
          Severity: major
          Priority: Normal
         Component: gst-plugins-good
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: deanna at sdf.lonestar.org
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Please describe the problem:
One of my sound devices can do variable rate audio to the Hz.  Using gst-launch
audiotestsrc takes about 12 minutes to complete the rate checks and generates
around 150MB of debug info, playing static noise all the while.  This seems to
be because the check for exact rate resampling capability in gstosshelper.c is
broken.

Steps to reproduce:
1. gst-launch-0.10 audiotestsrc ! audioconvert ! audioresample ! osssink
2. 
3. 


Actual results:
12 minutes of static.

Expected results:
A clear sine wave should play.

Does this happen every time?
Yes.

Other information:
I'm not sure exactly how this check was meant to happen, since there are unused
variables lying around and other things that seem very out of place, such as
disabling the exact rate checking altogether.  But here is a patch that fixes
it for me.

--- gstosshelper.c.orig       Tue Apr  8 15:49:34 2008
+++ gstosshelper.c      Thu Jun 12 17:47:11 2008
@@ -267,6 +267,7 @@
     int max1;
     int mid;
     int mid_ret;
+    int max_exact_matches = 20;

     GST_DEBUG ("checking [%d,%d]", range->min, range->max);

@@ -278,19 +279,15 @@
     }
     n_checks++;

-    if (mid == mid_ret && checking_exact_rates) {
-      int max_exact_matches = 20;
-
+    if (mid == mid_ret && checking_exact_rates)
       exact_rates++;
-      if (exact_rates > max_exact_matches) {
-        GST_DEBUG ("got %d exact rates, assuming all are exact",
-            max_exact_matches);
-        result = FALSE;
-        g_free (range);
-        break;
-      }
-    } else {
-      checking_exact_rates = FALSE;
+
+    if (exact_rates > max_exact_matches) {
+      GST_DEBUG ("got %d exact rates, assuming all are exact",
+                max_exact_matches);
+      result = FALSE;
+      g_free (range);
+      break;
     }

     /* Assume that the rate is arithmetically rounded to the nearest


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=538068.




More information about the Gstreamer-bugs mailing list