diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2013-08-26 16:49:53 -0400 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2014-04-03 02:24:03 +0200 |
commit | 36615815bf92ec0f6d4ed067689bb72f695e3bf9 (patch) | |
tree | 20452cb218953d32de0a3213186c2dca179fd4af /apps/plugins/pegbox.c | |
parent | bfd0179042b0b02fb88748d54e56e7e208bb117f (diff) | |
download | rockbox-36615815bf92ec0f6d4ed067689bb72f695e3bf9.tar.gz rockbox-36615815bf92ec0f6d4ed067689bb72f695e3bf9.zip |
Buffering: Remove buf_ridx and buf_widx; these data are verbose.
It is trivial to obtain all required information from the allocated
handles without maintaining global indexes. In fact, it is less
complicated and increases general thread safety.
Other miscellaneous changes (some are nice to do at this time due to
required alterations, with some particularly more relevant than others):
* Handle value 0 will no longer be returned as a valid handle but all
failures will still return a negative value. Creates consistency with
buflib and removes the need to explicitly initialize them.
* Linking a new handle is delayed until explicitly
added by the code that called add_handle, keeping it invisible
until every operation succeeds, which is safer thread-wise. If anything
fails, the handle itself may just be abandoned rather than reqiring it
be freed.
* Dump the special handling to slow buffering when the PCM buffer
is low that calls PCM buffer functions. It doesn't seem to help much
of anything these days and it's a bit of a nasty hack to directly
tie those bits together. It can of course be put back (again!) if
there really is a need for it.
* Make data waiters ping the buffering thread more than just once if
the request is taking too long. Somehow I figured out how the requests
could get forgotten about but can't remember why months later after
making the change in my branch. :-)
* Neaten up some code by using (inline) functions and packing down
parameters; remember handle allocation and movement attributes in the
handle itself rather than figuring it out each time they're needed.
Change-Id: Ibf863370da3dd805132fc135e0ad104953365183
Reviewed-on: http://gerrit.rockbox.org/764
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
Diffstat (limited to 'apps/plugins/pegbox.c')
0 files changed, 0 insertions, 0 deletions