Re: Question about the buffer length in the transfer callback of the PCM External Plugin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux