This fixes the radioart crash that was the result of buffering.c working
on a freed buffer at the same time as buflib (radioart uses buffering.c for the
images). With this change the buffer is owned by buflib exclusively so this
cannot happen.
As a result, audio_get_buffer() doesn't exist anymore. Callers should call
core_alloc_maximum() directly. This buffer needs to be protected as usual
against movement if necessary (previously it was not protected at all which
cased the radioart crash), To get most of it they can adjust the willingness of
the talk engine to give its buffer away (at the expense of disabling voice
interface) with the new talk_buffer_set_policy() function.
Change-Id: I52123012208d04967876a304451d634e2bef3a33
* Remove explicit tracking of elapsed time of previous track.
* Remove function to obtain auto skip flag.
* Most playback events now carry the extra information instead and
pass 'struct track_event *' for data.
* Tweak scrobbler to use PLAYBACK_EVENT_TRACK_FINISH, which makes
it cleaner and removes the struct mp3entry.
Change-Id: I500d2abb4056a32646496efc3617406e36811ec5
Eliminates the pcmrec thread and keeps playback and recording engine
operation mutually-exclusive.
audio_thread.c contains the audio thread which branches to the
correct engine depending upon the request. It also handles the main
audio initialization.
Moves pcm_init into main.c just before dsp_init because I don't want
that one in audio_init in the new file.
(Also makes revision df6e1bc pointless ;)
Change-Id: Ifc1db24404e6d8dd9ac42d9f4dfbc207aa9a26e1
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.
Buffer init is moved up in the init chain and handles ipodvideo64mb internally.
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 mp3data.c and talk mess with the buffer.
mpeg.c now implements some buffer related functions of playback.h, especially
audio_get_buffer(), allowing to reduce #ifdef hell a tiny bit.
audiobuf and audiobufend are local to buffer.c now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30308 a1c6a512-1295-4272-9138-f99709370657
- Support is limited to non-desync jpeg in id3v2 tags. Other formats (hopefully) follow in the future.
- Embedded album art takes precedence over files in album art files.
- No additional buffers are used, the jpeg is read directly from the audio file.
Flyspray: FS#11216
Author: Yoshihisa Uchida and I
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29259 a1c6a512-1295-4272-9138-f99709370657
Playback now has a few albumart slots. Anything (most importantly: skins) can obtain such a slot.
The slot has fields for the size which is passed to bufopen then to image_load to buffer the albumart with the proper size.
Currently there's 1 slot. We can increase it for remotes if we want. Custom statusbar will increase it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23209 a1c6a512-1295-4272-9138-f99709370657
-add wrappers wps_data_load() and wps_data_init() so that other code doesn't need the structs for that
-change (and rename) gui_sync_wps_uses_albumart() to take points to be filled as parameter to get the AA size of a wps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22139 a1c6a512-1295-4272-9138-f99709370657
-Allows loading multiple thumbnails back-to-back in the one thumbnail buffer.
-Mutex to prevent race conditions with talk queue indices and
thumbnail buffer state.
-Synchronous shutup.
-Shutup is a noop if no voice is queued.
-mp3_play_stop() does nothing until the audio thread is ready.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18046 a1c6a512-1295-4272-9138-f99709370657
buffering.c and buffering.h implement the new buffering API. playback.c is translated to that API. For more information about the whole concept, see http://www.rockbox.org/wiki/MetadataOnBuffer.
There should be no major visible changes, but most existing bugs remain (though fixing them should be easier now that playback.c is a bit less complex) and there probably will be new ones. Please report any problem!
Next step is to adapt cuesheet support, which is partly disabled here, and of course fix as much bugs as possible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15306 a1c6a512-1295-4272-9138-f99709370657