Jaroslav Kysela wrote: > > On Sun, 9 Dec 2001, Abramo Bagnara wrote: > > > Jaroslav Kysela wrote: > > > > > > On Sat, 8 Dec 2001, Tim Goetze wrote: > > > > > > > the doc to snd_pcm_mmap_commit says > > > > > > > > * \return 0 on success otherwise a negative error code > > > > > > > > but on success it rather seems to return >= 0 (the number of frames > > > > commited i think). > > > > > > > > please clarify and fix. > > > > > > Yes, it's definitely wrong. The return value should be zero or an error. > > > The description is fine, but the implementation fails. I'm working on it. > > > > I'm not so sure that documentation was right and implementation wrong. > > > > What are the reasons of this choice vs. the opposite one? > > > > Are you sure that for each PCM type is always possible to commit *all* > > frames or none? What happens if after a first partial transfer we get an > > xrun? > > We return an error and appl_ptr will be increased with amount of > successfully written frames, so we can use this value later for
How you know this amount? > recovery. I think that we should add a new function called (for example) > snd_pcm_mmap_commit_partial which will take care about partial > transfers as well to allow good recovery. I don't think it's a good idea... I've thought more on the problem during this week end and I believe that implementation was right before your change and *documentation* should had to be changed. -- Abramo Bagnara mailto:[EMAIL PROTECTED] Opera Unica Phone: +39.546.656023 Via Emilia Interna, 140 48014 Castel Bolognese (RA) - Italy ALSA project http://www.alsa-project.org It sounds good! _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel