This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#12159 - GSoC/Buflib: Remove direct audiobuf accesses
Attached to Project:
Rockbox
Opened by Thomas Martitz (kugel.) - Tuesday, 14 June 2011, 18:06 GMT+2
Last edited by Thomas Martitz (kugel.) - Monday, 15 August 2011, 14:52 GMT+2
Opened by Thomas Martitz (kugel.) - Tuesday, 14 June 2011, 18:06 GMT+2
Last edited by Thomas Martitz (kugel.) - Monday, 15 August 2011, 14:52 GMT+2
|
DetailsReplace all direct accesses to audiobuf with buffer API functions.
Namely, introduce buffer_get_buffer() and buffer_release_buffer(). buffer_get_buffer() aquires all available and grabs a lock, attempting to call buffer_alloc() or buffer_get_buffer() while this lock is locked will cause a panicf() (doesn't actually happen, but is for debugging purpose). buffer_release_buffer() unlocks that lock and can additionally increment the audiobuf buffer to make an allocation. Pass 0 to only unlock if buffer was used temporarily only. buffer_available() is a replacement function to query audiobuflen, i.e. what's left in the buffer. Further changes happened to mp3data.c and talk.c as to not call the above API functions, but get the buffer from callers. The caller is the audio system which has the buffer lock while mp3dat and talk mess with the buffer. mpeg.c now implements some buffer related functions of playback.h, that no #ifdefs are needed anymore around audio_get_buffer(). audiobuf and audiobufend are local to buffer.c now. |
This task depends upon
Closed by Thomas Martitz (kugel.)
Monday, 15 August 2011, 14:52 GMT+2
Reason for closing: Accepted
Additional comments about closing: r30308
Monday, 15 August 2011, 14:52 GMT+2
Reason for closing: Accepted
Additional comments about closing: r30308
*) Rebased to current svn
*) Few bug fixes.