Re: [alsa-devel] Question about the buffer length in the transfer callback of the PCM External Plugin
6 Nov
2016
6 Nov
'16
12:26 p.m.
Bach, Andrea wrote:
What I tried is to copy the buffer I get in chunks of a 64 bytes into an intermediate buffer for processing and whenever I processed 64 bytes I copied the result to the output buffer .... but what to do with the remaining 40 bytes...
Leave them in the intermediate buffer, and handle them later when you've got 24 more bytes.
and what to return in the output buffer when the remaining bytes could not be processed??
Delay the entire chain by 64 bytes, i.e., insert 64 byte at the start of the stream. Then you always have too many bytes instead of too few bytes, and those can be handled with the intermediate buffer.
Regards, Clemens
2968
Age (days ago)
2968
Last active (days ago)
0 comments
1 participants
participants (1)
-
Clemens Ladisch