On Tue, 3 Feb 2004, James Courtier-Dutton wrote:
> >>I attach a patch that fixes alsa-lib.
> >>All it does it call snd_pcm_start() just before snd_pcm_wait() and due
> >>to the if statement just above it, will only happen when the buffer is
> >>going to be filled, therefore ensuring that even if "start_threshold" is
> >>set too high, snd_pcm_start() will always be called if the buffer is
> >>full, or about to become full.
> >
> >
> > I don't think that this is a right fix. The programmer must know what is
> > doing and the manual start is still alternative. You must set
> > start_threshold to (buffer_size / period_size) * period_size in your case.
> >
> > Jaroslav
> >
> A don't think this is an application programmer bug. After all your
> program alsa-lib/test/pcm.c had it set to start_threshold==buffer_size,
> and you are one of the main alsa developers. So if you thought that was
> an OK thing to set, why won't other people?
Yes, it was clearly my fault.
> My point is, I don't think setting start_threshold to buffer_size is
> even "wrong" at all. Some people might want the buffer to be full before
> it starts, and my patch allows for that.
It's not wrong semantics. I see - it's logical, but I don't want to follow
some rule as some API designers does - control magically some things. I
want that developer which uses our API knows what the library / driver
exactly does.
We have clear conditions when the stream is started. That's it.
Jaroslav
-----
Jaroslav Kysela <[EMAIL PROTECTED]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel