Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e00eefe6 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Fix several test-resample BufferProvider bugs

Previously getNextBuffer always returned the same data address over
and over.  Now it correctly returns the right portion of the input buffer.

Previously getNextBuffer always returned the total number of frames in
the input, which might be larger than the size requested by the caller,
and/or larger than the number of remaining input frames.  It also always
returned successfully, even when there should be no frames available.
This violates the contract for getNextBuffer.  Now getNextBuffer will
return the maximum of the number of frames requested, and the number of
remaining frames available.  If that maximum is zero, getNextBuffer will
return an error instead.

Previously releaseBuffer would silently allow releasing more frames than
were actually gotten, which violates the contract for releaseBuffer.
Now releaseBuffer checks for this and logs a message if it happens.

Add 'v' (verbose) option to log buffer provider calls.

Bug: 12194314
Change-Id: I9b915e954b3612a07ef271da8652486b8875e0fd
parent e175e5ec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment