On Fri, Aug 03, 2007 at 07:20:38PM +0000, Jacob Meuser wrote:
> On Fri, Aug 03, 2007 at 08:06:08PM +0200, Tim van der Molen wrote:

> > If I run ogg123, its time counter counts very fast for a while.
> > Meanwhile, I hear no sound. At some point, the time count is normal and
> > I hear the music stuttering for a moment, but after that it is fine. The
> > music stutters very seldomly.
> > 
> > The duration of the `fast time count' depends on the time I haven't used
> > esound. The longer the time between two ogg123 invocations, the longer
> > the fast time count goes on. Waiting 10 seconds results in the fast time
> > count going to ~ 6 seconds; waiting ~ 5 minutes results in the fast time
> > count going to ~ 2.5 minutes.
> 
> that sounds like pretty broken behaviour to me.
> 
> I was already thinking there is a timing problem based on the previous
> reports, but this seems like definitive proof.
> 
> > If you need more information, please let me know.
> 
> if you could test with another audio device, that would be sweet.

while I still believe there to be a timing problem in esound, it's
possible that the problem is exacerbated in the audio layer.

and it seems that auich device clocks are not as precise as one
would hope, which could explain why the problem is mostly
seen on auich.

when the audio layer detects that it has not received enough data
to keep up with the hardware, it inserts silence.  now, I did make
a change that allows this to happen when it should, that is, right
away, as opposed to waiting until the next write().  this was one
of the first changes, and it has been previously reported that this
did not cause the problems to start.  but perhaps when it was tested,
the auich clock just happened to be working better, the stars were
aligned, or whatever.


anyway, people who are having problems with playback on auich,
with esound, or anything else (opera flash-plugin seems to have
a similar issue), please see if the following diff changes the
situation.

-- 
[EMAIL PROTECTED]
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: audio.c
===================================================================
RCS file: /home/cvs/OpenBSD/src/sys/dev/audio.c,v
retrieving revision 1.71
diff -u -r1.71 audio.c
--- audio.c     2 Aug 2007 07:24:46 -0000       1.71
+++ audio.c     3 Aug 2007 23:52:50 -0000
@@ -1753,7 +1753,6 @@
     
 #define        AUDIO_FILTWRITE(sc) ( \
     (!sc->sc_full_duplex && (sc->sc_mode & AUMODE_RECORD)) ||          \
-    (!(sc->sc_mode & AUMODE_PLAY_ALL) && sc->sc_playdrop > 0) ||       \
     (sc->sc_pr.used <= sc->sc_pr.usedlow))
 
 int

Reply via email to