summaryrefslogtreecommitdiff
path: root/apps/playback.c (follow)
Commit message (Collapse)AuthorAge
* Fix a problem with audio not starting on a list of short filesMichael Sevakis2017-04-06
| | | | | | | | | | | | Forced audio start was left out when a third codec attempts to start a second track transition. Only one pending transition is allowed at a time. There wouldn't be enough PCM in the buffer to trigger audio playback and audio would just return without giving the pcm buffer a kick. Fixes FS#13100 - Player failed on short tracks Change-Id: I338b0b12022c591930451fd5ed26a2a73008835f
* Fix broken logfMihail Zenkov2016-03-30
|
* iBasso DX50/DX90: Major code cleanup and reorganization.Udo Schläpfer2015-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reorganization - Separated iBasso devices from PLATFORM_ANDROID. These are now standlone hosted targets. Most device specific code is in the firmware/target/hosted/ibasso directory. - No dependency on Android SDK, only the Android NDK is needed. 32 bit Android NDK and Android API Level 16. - Separate implementation for each device where feasible. Code cleanup - Rewrite of existing code, from simple reformat to complete reimplementation. - New backlight interface, seperating backlight from touchscreen. - Rewrite of device button handler, removing unneeded code and fixing memory leaks. - New Debug messages interface logging to Android adb logcat (DEBUGF, panicf, logf). - Rewrite of lcd device handler, removing unneeded code and fixing memory leaks. - Rewrite of audiohw device handler/pcm interface, removing unneeded code and fixing memory leaks, enabling 44.1/48kHz pthreaded playback. - Rewrite of power and powermng, proper shutdown, using batterylog results (see http://gerrit.rockbox.org/r/#/c/1047/). - Rewrite of configure (Android NDK) and device specific config. - Rewrite of the Android NDK specific Makefile. Misc - All plugins/games/demos activated. - Update tinyalsa to latest from https://github.com/tinyalsa/tinyalsa. Includes - http://gerrit.rockbox.org/r/#/c/993/ - http://gerrit.rockbox.org/r/#/c/1010/ - http://gerrit.rockbox.org/r/#/c/1035/ Does not include http://gerrit.rockbox.org/r/#/c/1007/ due to new backlight interface and new option for hold switch, touchscreen, physical button interaction. Rockbox needs the iBasso DX50/DX90 loader for startup, see http://gerrit.rockbox.org/r/#/c/1099/ The loader expects Rockbox to be installed in /mnt/sdcard/.rockbox/. If /mnt/sdcard/ is accessed as USB mass storage device, Rockbox will exit gracefully and the loader will restart Rockbox on USB disconnect. Tested on iBasso DX50. Compiled (not tested) for iBasso DX90. Compiled (not tested) for PLATFORM_ANDROID. Change-Id: I5f5e22e68f5b4cf29c28e2b40b2c265f2beb7ab7
* Make a few local variables staticThomas Jarosch2015-01-11
| | | | Change-Id: Ieb77a7f2cdf765afa3121320d03c0478cd97eb0f
* Remove I/O priority. It is harmful when used with the new file code.Michael Sevakis2014-08-30
| | | | | | | | | | HAVE_IO_PRIORITY was defined for native targets with dircache. It is already effectively disabled for the most part since dircache no longer lowers its thread's I/O priority. It existed primarily for the aforementioned configuration. Change-Id: Ia04935305397ba14df34647c8ea29c2acaea92aa
* Fix a playback bug in shink_callback()Michael Sevakis2014-06-20
| | | | | | | | | Invalid event data would be accessed if a play message isn't queued which will cause crash problems. It came about in the addition of time-based resume. Change-Id: I1d5219064e2bf552b4183e9db4e7b380ffbe7a67
* events: Rework event subsystem (add_event, send_event) to be more versatile.Thomas Martitz2014-03-14
| | | | | | | | | | | | | | | | | | add_event_ex is added that takes an extra user_data pointer. This pointer is passed to the callback (add_event and add_event_ex have slightly different callbacks types). All callbacks also get the event id passed. Events added with add_event_ex must be removed with remove_event_ex because the user_data pointer must match in addition to the callback pointer. On the other add_event is simplified to omit the oneshort parameter which was almost always false (still there with add_event_ex). As a side effect the ata_idle_notify callbacks are changed as well, they do not take a data parameter anymore which was always NULL anyway. This commit also adds some documentation to events.h Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
* Implement time-based resume and playback start.Michael Sevakis2014-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This complements offset-based resume and playback start funcionality. The implementation is global on both HWCODEC and SWCODEC. Basically, if either the specified elapsed or offset are non-zero, it indicates a mid-track resume. To resume by time only, set elapsed to nonzero and offset to zero. To resume by offset only, set offset to nonzero and elapsed to zero. Which one the codec uses and which has priority is up to the codec; however, using an elapsed time covers more cases: * Codecs not able to use an offset such as VGM or other atomic formats * Starting playback at a nonzero elapsed time from a source that contains no offset, such as a cuesheet The change re-versions pretty much everything from tagcache to nvram. Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38 Reviewed-on: http://gerrit.rockbox.org/516 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested: Michael Sevakis <jethead71@rockbox.org>
* playback,talk: Share audiobuffer via core_alloc_maximum().Thomas Martitz2013-12-23
| | | | | | | | | | | | | | | | 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
* playback: Fix build with LOGF_ENABLE.Andrew Ryabinin2013-11-10
| | | | Change-Id: I01154d4a9441f44852748c910c267419f7f4149e
* Get rid of some superfluous single-purpose functions in playback.Michael Sevakis2013-07-13
| | | | | | | | | | | * 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
* Enable setting of global output samplerate on certain targets.Michael Sevakis2013-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces the NATIVE_FREQUENCY constant with a configurable frequency. The user may select 48000Hz if the hardware supports it. The default is still 44100Hz and the minimum is 44100Hz. The setting is located in the playback settings, under "Frequency". "Frequency" was duplicated in english.lang for now to avoid having to fix every .lang file for the moment and throwing everything out of sync because of the new play_frequency feature in features.txt. The next cleanup should combine it with the one included for recording and generalize the ID label. If the hardware doesn't support 48000Hz, no setting will be available. On particular hardware where very high rates are practical and desireable, the upper bound can be extended by patching. The PCM mixer can be configured to play at the full hardware frequency range. The DSP core can configure to the hardware minimum up to the maximum playback setting (some buffers must be reserved according to the maximum rate). If only 44100Hz is supported or possible on a given target for playback, using the DSP and mixer at other samperates is possible if the hardware offers them. Change-Id: I6023cf0c0baa8bc6292b6919b4dd3618a6a25622 Reviewed-on: http://gerrit.rockbox.org/479 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* SWCODEC Audio: Add some INIT_ATTR's to get a few bytes back.Michael Sevakis2013-06-29
| | | | Change-Id: Ie7b04ecf3b3535e0ed45a6e0e8d81af89e38378e
* Update software recording engine to latest codec interface.Michael Sevakis2013-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically, just give it a good rewrite. Software codec recording can be implemented in a more straightforward and simple manner and made more robust through the better codec control now available. Encoded audio buffer uses a packed format instead of fixed-size chunks and uses smaller data headers leading to more efficient usage. The greatest benefit is with a VBR format like wavpack which needs to request a maximum size but only actually ends up committing part of that request. No guard buffers are used for either PCM or encoded audio. PCM is read into the codec's provided buffer and mono conversion done at that time in the core if required. Any highly-specialized sample conversion is still done within the codec itself, such as 32-bit (wavpack) or interleaved mono (mp3). There is no longer a separate filename array. All metadata goes onto the main encoded audio buffer, eliminating any predermined file limit on the buffer as well as not wasting the space for unused path queue slots. The core and codec interface is less awkward and a bit more sensible. Some less useful interface features were removed. Threads are kept on narrow code paths ie. the audio thread never calls encoding functions and the codec thread never calls file functions as before. Codecs no longer call file functions directly. Writes are buffered in the core and data written to storage in larger chunks to speed up flushing of data. In fact, codecs are no longer aware of the stream being a file at all and have no access to the fd. SPDIF frequency detection no longer requires a restart of recording or plugging the source before entering the screen. It will poll for changes and update when stopped or prerecording (which does discard now-invalid prerecorded data). I've seen to it that writing a proper header on full disk works when the format makes it reasonably practical to do so. Other cases may have incorrect data sizes but sample info will be in tact. File left that way may play anyway. mp3_enc.codec acquires the ability to write 'Info' headers with LAME tags to make it gapless (bonus). Change-Id: I670685166d5eb32ef58ef317f50b8af766ceb653 Reviewed-on: http://gerrit.rockbox.org/493 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* Fix some whitespace in files changed in following commit.Michael Sevakis2013-06-30
| | | | | | | Change-Id: Ie3f43e43076e0dcae9a10f1b0b9e4698b398acee Reviewed-on: http://gerrit.rockbox.org/492 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* Argh, move a comment to the (now) proper location. :)Michael Sevakis2013-05-31
| | | | Change-Id: I13847b99d9aeaa05efa5b22a8e4842f193f01a3c
* Have voice fire an event when it starts and stops playing.Michael Sevakis2013-05-31
| | | | | | | | | | | Further decouples voice_thread.c from other playback areas. Also allows other audio sources, such as FM radio, to be attenuated when voice is playing by implementing a callback. Defined as another playback event rather than a new event class: PLAYBACK_EVENT_VOICE_PLAYING Change-Id: I2e3e218be6cd6bebbf39e7883a8c0e4ed42b62bb
* Should use HAVE_RECORDING, not AUDIO_HAVE_RECORDING in playback.cMichael Sevakis2013-05-31
| | | | | | SIM should work like target, sort of, when recording is initialized. Change-Id: I12314bb98cec53d574f4b25984ef803b2c038a96
* Some corrections after 5857c44.Michael Sevakis2013-05-31
| | | | | | | | | | Playback needs to receive a couple of settings-related messages even when not playing. Put the message reply back where it was when loading an encoder for recording. Change-Id: I8cc80f46e42a0afd119991d698510e1ebef38ead
* Refactor audio thread to run both recording and playback.Michael Sevakis2013-05-31
| | | | | | | | | | | | | | | | 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
* Change audio_set_cuesheet parameter from int to bool (fixes cppcheck warning)Bertrik Sikken2013-03-24
| | | | Change-Id: Icb31c8bd8605aca27765a94b609c41f1f706426f
* More snafu fix. Need a couple more patchups for now.Michael Sevakis2012-05-24
| | | | | | | Must restore talk buffer explicitly when not taking it and promote the buffer state. Change-Id: Ia0341ede05837e6e94885a9ad62460c415ec6f00
* Fix some lockup caused by handles not being initialized to < 0...Michael Sevakis2012-05-21
| | | | | | | | | | | | | | ...by default where they would be interpreted as valid but not actually be which would cause calls to buffering while it was not initialized. Add BUFFER_EVENT_BUFFER_RESET to inform users of buffering that the buffer is being reinitialized. Basically, this wraps all the functionality being provided by three events (...START_PLAYBACK, RECORDING_EVENT_START, RECORDING_EVENT_STOP) into one for radioart.c, the only user of those events (perhaps remove them?) and closes some loopholes. Change-Id: I99ec46b9b5fb4e36605db5944c60ed986163db3a
* Use buflib for the allocation of voice PCM resources.Michael Sevakis2012-05-02
| | | | | | | | | | | | | Buffers are not allocated and thread is not created until the first call where voice is required. Adds a different callback (sync_callback) to buflib so that other sorts of synchonization are possible, such as briefly locking-out the PCM callback for a buffer move. It's sort of a messy addition but it is needed so voice decoding won't have to be stopped when its buffer is moved. Change-Id: I4d4d8c35eed5dd15fb7ee7df9323af3d036e92b3
* rbcodec refactoring: autoresumableSean Bartell2012-05-01
| | | | | | | | Moved to playback.c, since it doesn't use metadata from the music file. Change-Id: I5c3ad7750d94b36754f64eb302f96ec163785cb9 Reviewed-on: http://gerrit.rockbox.org/142 Reviewed-by: Nils Wallménius <nils@rockbox.org>
* rbcodec refactoring: get_audio_base_data_typeSean Bartell2012-04-28
| | | | | | | | | | This function has been changed to rbcodec_format_is_atomic, which doesn't require an enum from the kernel. Change-Id: I1d537605087fe130a9b545509d7b8a340806dbf2 Reviewed-on: http://gerrit.rockbox.org/141 Reviewed-by: Nils Wallménius <nils@rockbox.org> Tested-by: Nils Wallménius <nils@rockbox.org>
* buflib/shrink_callback: Resume playback only if it was playing (not paused).Thomas Martitz2012-03-25
| | | | Change-Id: Ie4884ec4554890f8bdb03f48bcf215ece00a5560
* Option to constrain get_next_dir() to directories below ↵Nick Peskett2012-03-19
| | | | | | | | | | | | | | global_settings.start_directory. When enabled, if the user has set "Start File Browser Here" (config.cfg: start directory) to anything other than root and "Auto-Change Directory" is set to "Yes" or "Random", the directory returned when an auto change is required will be constrained to the value of "start directory" or below. Change-Id: Iaab773868c4cab5a54f6ae67bdb22e84642a9e4b Reviewed-on: http://gerrit.rockbox.org/182 Reviewed-by: Nick Peskett <rockbox@peskett.co.uk> Tested-by: Nick Peskett <rockbox@peskett.co.uk>
* Rename 'mp3entry.embed_albumart' to 'mp3entry.has_embedded_albumart' ↵Alexander Levin2011-12-22
| | | | | | (FS#12470). No functional changes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31405 a1c6a512-1295-4272-9138-f99709370657
* FS #12419 : Support for embedded cuesheets.Nick Peskett2011-12-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31321 a1c6a512-1295-4272-9138-f99709370657
* FS#12378 : Remove various unused code, and comment out some unused code and ↵Boris Gjenero2011-12-14
| | | | | | data for reference or future use. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31256 a1c6a512-1295-4272-9138-f99709370657
* Simulate usb plugging on the sim better using sim_tasks.Thomas Martitz2011-11-17
| | | | | | Now all threads need to ack the connection like on real target, dircache is unloaded and playback stops accordingly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31009 a1c6a512-1295-4272-9138-f99709370657
* Buflib: Make shrinking and buflib_available() smarter.Thomas Martitz2011-11-17
| | | | | | | | | | | | | | | | | * shrinking now considers freespace just before the alloc-to-be-shrinked, that means less (or sometimes none at all) is taken from the audio buffer. * core_available() now searches for the best free space, instead of simply the end, i.e. it will not return 0 if the audio buffer is allocated and there's free space before it. It also runs a compaction to ensure maximum contiguous memory. audio_buffer_available() is also enhanced. It now considers the 256K reserve buffer, and returns free buflib space instead if the audio buffer is short. This all fixes the root problem of FS#12344 (Sansa Clip+: PANIC occurred when dircache is enabled), that alloced from the audio buffer, even if it was very short and buflib had many more available as free space before it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31006 a1c6a512-1295-4272-9138-f99709370657
* Fix warning and typos.Thomas Martitz2011-11-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30912 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#12279 - playback starts from the beginning when changing themes.Thomas Martitz2011-11-05
| | | | | | | | | | | Very frequent start-stop cycles (as caused by frequent core_alloc() calls) of audio makes the codecs lose the resume position, and this causes playback from the beginning. To work around, use queue_post() instead of queue_send() to delay the resume so that it only resumes once per core_alloc() set. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30900 a1c6a512-1295-4272-9138-f99709370657
* In the playback buflib shrink callback, ensure a minimum buffer remains forThomas Martitz2011-11-03
| | | | | | | | | audio playback. If it goes below 256K new buflib allocations fail. This prevents buffer underruns as the new buffer size wasn't actually checked at all. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30893 a1c6a512-1295-4272-9138-f99709370657
* Make a few local functions staticBertrik Sikken2011-10-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30744 a1c6a512-1295-4272-9138-f99709370657
* Revert r30480 "Buflib/swcodec: Improve playback stopping behavior on ↵Thomas Martitz2011-09-19
| | | | | | | | | allocation." The buflib metadata gets corrupted at the new loation between core_shrink() and actually applying, the new buffer boundaries (most probably due to yield()). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30574 a1c6a512-1295-4272-9138-f99709370657
* Buflib/swcodec: Improve playback stopping behavior on allocation.Thomas Martitz2011-09-08
| | | | | | | | Reuse playback's Q_AUDIO_REMAKE_AUDIO_BUFFER capabilities to set the new playback buffer, instead of stopping/restarting manual. This strongly reduces the visibility of the short audio stop. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30480 a1c6a512-1295-4272-9138-f99709370657
* Shuffle some functions around so that interfacing with playback.c in ↵Michael Sevakis2011-09-01
| | | | | | particular isn't required. Though playback does finish the audio init, pcm doesn't care who does it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30403 a1c6a512-1295-4272-9138-f99709370657
* Remove obsolete init cruft from audio system because of diminished ↵Michael Sevakis2011-09-01
| | | | | | dependencies. All talk/voice dependency in playback.c should be imminently removable. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30401 a1c6a512-1295-4272-9138-f99709370657
* Fix red.Andree Buschmann2011-08-30
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30392 a1c6a512-1295-4272-9138-f99709370657
* GSoC/Buflib: Enable compaction in buflib.Thomas Martitz2011-08-30
| | | | | | | | | | | | | | | | | | | This enables the ability to allocate (and free) memory dynamically without fragmentation, through compaction. This means allocations can move and fragmentation be reduced. Most changes are preparing Rockbox for this, which many times means adding a move callback which can temporarily disable movement when the corresponding code is in a critical section. For now, the audio buffer allocation has a central role, because it's the one having allocated most. This buffer is able to shrink itself, for which it needs to stop playback for a very short moment. For this, audio_buffer_available() returns the size of the audio buffer which can possibly be used by other allocations because the audio buffer can shrink. lastfm scrobbling and timestretch can now be toggled at runtime without requiring a reboot. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30381 a1c6a512-1295-4272-9138-f99709370657
* GSoC/Buflib: Add buflib memory alocator to the core.Thomas Martitz2011-08-30
| | | | | | | | | | | | | | | | | The buflib memory allocator is handle based and can free and compact, move or resize memory on demand. This allows to effeciently allocate memory dynamically without an MMU, by avoiding fragmentation through memory compaction. This patch adds the buflib library to the core, along with convinience wrappers to omit the context parameter. Compaction is not yet enabled, but will be in a later patch. Therefore, this acts as a replacement for buffer_alloc/buffer_get_buffer() with the benifit of a debug menu. See buflib.h for some API documentation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30380 a1c6a512-1295-4272-9138-f99709370657
* Commit work started in FS#12153 to put timing/position information in PCMMichael Sevakis2011-08-28
| | | | | | | | | | | | | | | | | | | | | | | | | buffer chunks. * Samples and position indication is closely associated with audio data instead of compensating by a latency constant. Alleviates problems with using the elapsed as a track indicator where it could be off by several steps. * Timing is accurate throughout track even if resampling for pitch shift, whereas before it updated during transition latency at the normal 1:1 rate. * Simpler PCM buffer with a constant chunk size, no linked lists. In converting crossfade, a minor change was made to not change the WPS until the fade-in of the incoming track, whereas before it would change upon the start of the fade-out of the outgoing track possibly having the WPS change with far too much lead time. Codec changes are to set elapsed times *before* writing next PCM frame because time and position data last set are saved in the next committed PCM chunk. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30366 a1c6a512-1295-4272-9138-f99709370657
* Remove a slightly silly null dereference. (a.k.a. I'm playing with cppcheck ↵Steve Bavin2011-08-26
| | | | | | too.) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30357 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#12238 - WPS delay on pause introduced by r30097 which was the excuse ↵Michael Sevakis2011-08-23
| | | | | | I wanted anyway to do a better PCM fade on stop/pause implementation. New fade is asynchronous tick-based. Restores skin update points in the WPS that were removed when fading mechanism was changed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30340 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#12234 - Simulator crashes when playing mp3 file with cuesheet. The ↵Michael Sevakis2011-08-22
| | | | | | cuesheet in a lookahead mp3entry should not be taken to be valid, since it won't be the cue for the current track. Be sure id3->cuesheet is set NULL if grabbing the info from the buffer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30337 a1c6a512-1295-4272-9138-f99709370657
* GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions.Thomas Martitz2011-08-14
| | | | | | | | | | | | | | | | | | | | | | | 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
* revert r30226, which is apparently broken.Frank Gevaerts2011-08-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30232 a1c6a512-1295-4272-9138-f99709370657