]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: file: use snd_pcm_file_areas_read_infile for readi
authorAdam Miartus <amiartus@de.adit-jv.com>
Tue, 21 May 2019 13:33:08 +0000 (15:33 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 22 May 2019 14:20:26 +0000 (16:20 +0200)
commit349b42f5477c904fa3e10bac2fa2429fad2cbc65
treed535f07ff6d4fe00ff66b685844f0c28a7f14425
parent5f2e5af61b0b8cfbf310e8b1e08a034d993e432f
pcm: file: use snd_pcm_file_areas_read_infile for readi

use previously introduced helper function, this commit unifies behavior
of readi and readn

corner case behavior of readi is changed by this commit, previously,
in case 0 bytes were red from file (EOF), frames = 0 was returned,
signaling api user as if no data was red from slave, after the patch,
amount of frames red from slave with data red from slave stored in buffer
is returned when EOF is reached

Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
Reviewed-by: Timo Wischer <twischer@de.adit-jv.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_file.c