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 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. Jaroslav ----- Jaroslav Kysela <[EMAIL PROTECTED]> SuSE Linux http://www.suse.com ALSA Project http://www.alsa-project.org _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel