OSDN Git Service

pcm: Provide areas_copy function which handles buffer wrap around
authorTimo Wischer <twischer@de.adit-jv.com>
Tue, 13 Mar 2018 08:34:43 +0000 (09:34 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 13 Mar 2018 21:13:15 +0000 (22:13 +0100)
commit22618077e78a04120f19582700127b6456e21932
tree2b58869c667fb3f02cff53ffc9db90ec9d7f396b
parentdf2452cc6a35baacb6126869f74c6f7ad913736d
pcm: Provide areas_copy function which handles buffer wrap around

The already existing areas_copy functions do not care about the end of
the source and destination buffer.
Therefore the caller has to take care that the requested offset+size
is not exceeding any buffer limit.

This additional function will take care about the end of an buffer
and will continue at the beginning of the buffer.
For example this is required when copying between buffers with
different sizes (not multiple of).
This is often the case in IO plugins like the JACK plugin.

Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/pcm.h
src/pcm/pcm.c