Commit graph

654 commits

Author SHA1 Message Date
Maurus Cuelenaere
6bfce3bf63 Remove unused defines
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22470 a1c6a512-1295-4272-9138-f99709370657
2009-08-23 00:25:55 +00:00
Bertrik Sikken
0307cd16a0 Remove some unused #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22183 a1c6a512-1295-4272-9138-f99709370657
2009-08-06 08:20:06 +00:00
Thomas Martitz
3b75c86d74 A bit mroe wps/skin engine cleanup so that the structs the wps uses can be static:
-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
2009-08-03 15:06:30 +00:00
Mohamed Tarek
5f5d105755 Change the naming scheme for codecs found in different containers.
Like changing AFMT_AAC to AFMT_MP4_AAC and AFMT_RAAC to AFMT_RM_AAC.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22066 a1c6a512-1295-4272-9138-f99709370657
2009-07-27 12:13:22 +00:00
Jonathan Gordon
e96da7e52f Get cuesheets working again (hopefully fixes FS#10460), on swcodec only read the cuesheet from the buffer once
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22012 a1c6a512-1295-4272-9138-f99709370657
2009-07-23 05:23:54 +00:00
Jonathan Gordon
c46669a230 fix FS#10453 - the cuesheet changes broke playback on swcodec, rework it so it uses the audio buffer instead of a temp buffer from the start (which also removes one pretty big memcpy)
also remove the audio_filename from the cuesheet struct as its useless


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21982 a1c6a512-1295-4272-9138-f99709370657
2009-07-20 15:50:26 +00:00
Jonathan Gordon
24b136f62d rework cuesheet support:
swcodec: search for a .cue during buffering (with the possibility of adding embedded cuesheets later)
hwcodec: search for a .cue when the id3 info for the current track is requested for the first time (disk should be spining so non issue)

major beenfit from this is simplofy cuesheet handling code a bit... if mp3entry.cuesheet != NULL then there is a valid cuesheet.. no need to worry about if its enabled and preloaded.
There is the possibility of putting the next/prev subtrack handling inside the playback code (as well as the id3 updating stuff (see FS#9789 for more info), but thats probably not a good idea.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21978 a1c6a512-1295-4272-9138-f99709370657
2009-07-20 05:18:18 +00:00
Nils Wallménius
3d4701a6e4 FS#10080
* Move strncpy() from core to the pluginlib
* Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins
* Drop strncpy() from the codec api as no codec used it
* Bump codec and plugin api versions


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
2009-07-14 13:57:45 +00:00
Thomas Martitz
16e339d087 Bugfix for FS#10157 - "inaccurate seeking while paused" by Jeffrey Goode.
The pcmbuffer wasn't reset after subsequent seeks (i.e. all but the first one) when seeking while paused. This caused the buffer to be filled only once and so the wrong sound was played upon resuming. Now we make sure the pcmbuffer is always reset when not playing (a more detailed explaination is in the task).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21570 a1c6a512-1295-4272-9138-f99709370657
2009-06-29 19:24:48 +00:00
Thomas Martitz
8c5c92dc2c FS#10377 - "PCM buffer remainder is played under too many conditions" by Jeffrey Goode.
Prevents playing the remainder of the pcmbuf on manual stop, as it isn't needed in this case. Now the remainder is only played when the music automatically plays out.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21569 a1c6a512-1295-4272-9138-f99709370657
2009-06-29 19:13:50 +00:00
Dan Everton
d52c6614c5 Commit FS#10335 from Jeffrey Goode.
Ensure that the PCM buffer is flushed at the end of the last track in a
playlist.



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21316 a1c6a512-1295-4272-9138-f99709370657
2009-06-17 08:47:51 +00:00
Thomas Martitz
fc0c2fb546 Fix FS#10101 and FS#8999. Buffering was stopped prematurely if a manual track skip occured in between, leaving the CPU boosted, because audio_fill_file_buffer() returned if a new track was requested no matter of the filling state. Now keep buffering if it's currently filling the buffer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21244 a1c6a512-1295-4272-9138-f99709370657
2009-06-10 17:15:10 +00:00
Bertrik Sikken
0023943439 Fix duplicate #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20977 a1c6a512-1295-4272-9138-f99709370657
2009-05-17 14:50:19 +00:00
Boris Gjenero
7f94a9d02f In audio_current_track(), don't overwrite thistrack_id3 when it is being used by the codec. This fixes divide by zero errors when selecting other files while a FLAC file is playing. See FS#10102.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20764 a1c6a512-1295-4272-9138-f99709370657
2009-04-21 03:33:39 +00:00
Boris Gjenero
745e35c2d9 Fix red introduced in r20747
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20749 a1c6a512-1295-4272-9138-f99709370657
2009-04-19 20:01:36 +00:00
Boris Gjenero
b71aad65f5 Add anti-skip buffer time when calculating watermark. This fixes the "Anti-Skip Buffer" setting. Since the minimum and default value is 5 seconds, this is relevant even when that setting isn't changed. It prevents playback pauses on the 5G iPod, and it should also prevent pauses on other SWCODEC hard drive based players, including FS#10115.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20747 a1c6a512-1295-4272-9138-f99709370657
2009-04-19 19:38:56 +00:00
Jonathan Gordon
140c7e6f66 fix FS#10102 (progress doesnt get updated on the first track of a boot) and hopefully dont introduce any extra wierdness...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20705 a1c6a512-1295-4272-9138-f99709370657
2009-04-14 00:44:05 +00:00
Boris Gjenero
265d855031 Remove unnecessary copying of current track id3 data back into the buffer. It was used before when track_unbuffer_callback existed, but now PLAYBACK_EVENT_TRACK_FINISH takes care of this.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20638 a1c6a512-1295-4272-9138-f99709370657
2009-04-07 05:32:38 +00:00
Jonathan Gordon
843c7efaf8 FS9795 - some playback cleanup.
* Use events to notify things when the track has changed instead of the nasty has_track_changed()
* Event for when the mp3entry for the next track is avilable (which allows alot more tags to be static which means less redrawing in the WPS)
* virtually guarentee that the mp3entry sturct returned by audio_current/next_track() is going to be valid for the duration of the current track. The only time it wont be now is during the time between the codec finishing the previous track and the next track actually starting (~2s), but this is not an issue as long as it is called again when the TRACK_CHANGED event happens (or just use the pointer that gives)
It is still possible to confuse the WPS with the next tracks id3 info being displayed but this should fix itself up faster than it used to (and be harder to do)



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20633 a1c6a512-1295-4272-9138-f99709370657
2009-04-06 00:39:43 +00:00
Bertrik Sikken
66cf3a3329 Clean up some #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20238 a1c6a512-1295-4272-9138-f99709370657
2009-03-08 16:10:40 +00:00
Antonius Hellmann
76be948199 Correct comment and log message for failed AlbumArt bitmap loading.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20150 a1c6a512-1295-4272-9138-f99709370657
2009-03-01 07:46:08 +00:00
Antonius Hellmann
5355f34c55 Bugfix: If AlbumArt bitmap loading fails, dont try loading it over and over again, but simply ignore AlbumArt in this case.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20149 a1c6a512-1295-4272-9138-f99709370657
2009-03-01 07:39:57 +00:00
Thomas Martitz
6a67539780 Remove some unused code. bufopen for TYPE_ID3 can only return ERR_BUFFER_FULL (or a valid id of course) and no other error anyway.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20143 a1c6a512-1295-4272-9138-f99709370657
2009-02-28 20:08:30 +00:00
Frank Gevaerts
2c59de52d0 make audio_get_buffer() properly invalidate the buffer (FS#9935, fix by Nicolas Pennequin)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20106 a1c6a512-1295-4272-9138-f99709370657
2009-02-25 22:50:43 +00:00
Thomas Martitz
25b4334654 Now that filling is supposed to be reliable we can safely calculate the watermark at the end of buffering, not after every single track.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20095 a1c6a512-1295-4272-9138-f99709370657
2009-02-23 22:52:15 +00:00
Thomas Martitz
d7dee56b86 Set filling properly when codec doesn't fit too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20094 a1c6a512-1295-4272-9138-f99709370657
2009-02-23 22:50:08 +00:00
Thomas Martitz
5e1bab1cd8 Fix two rare bugs which caused playback to not unboost. The filling state was not set properly, if there was no space left for the handle for albumart or audio data. but for the handle for metadata. This also adds specific checks for ERR_BUFFER_FULL and appropriate logf messages.
This also appears to fix the constant boosting part of FS#8999 (at least I couldn't reproduce). It does certainly not fix that buffering is stucked.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20093 a1c6a512-1295-4272-9138-f99709370657
2009-02-23 21:09:30 +00:00
Antonius Hellmann
56f4723d19 Check for buffer low condition in AlbumArt bitmap loading to assure correct AA display for all tracks.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20092 a1c6a512-1295-4272-9138-f99709370657
2009-02-23 16:21:05 +00:00
Michael Sevakis
21f0c9a282 Make basic cache functions into calls, and get rid of CACHE_FUNCTION_WRAPPERS and CACHE_FUNCTIONS_AS_CALL macros. Rename flush/invalidate_icache to cpucache_flush/invalidate. They're inlined only if an implementation isn't provided by defining HAVE_CPUCACHE_FLUSH/INVALIDATE.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19971 a1c6a512-1295-4272-9138-f99709370657
2009-02-11 12:55:51 +00:00
Bertrik Sikken
91948d12aa FS#9638 - temp_cue is unused and wasting memory.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19890 a1c6a512-1295-4272-9138-f99709370657
2009-01-31 19:41:29 +00:00
Björn Stenberg
53a76de82b Increased default watermark from 3 to 5 seconds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19751 a1c6a512-1295-4272-9138-f99709370657
2009-01-11 23:21:31 +00:00
Björn Stenberg
6427d127aa Calculate watermark from bitrate and harddisk spinup time.
Use a smaller PCM buffer on targets with 2MB or less ram.
(FS#9703)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19743 a1c6a512-1295-4272-9138-f99709370657
2009-01-10 21:10:56 +00:00
Michael Sevakis
42d88cbafa Better just do some cache maintenence there for good luck.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19685 a1c6a512-1295-4272-9138-f99709370657
2009-01-05 10:48:50 +00:00
Michael Sevakis
2054627caa Have the codec thread do callbacks instead of messing with the stack which is much simpler and safer. Remove threads array from plugin API since it now serves no purpose. Up minimum API version and sort.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19684 a1c6a512-1295-4272-9138-f99709370657
2009-01-05 10:31:19 +00:00
Michael Giacomelli
70e9c7aed3 Commit FS#8624 by Linus Nielsen, Ryan Press, Craig Elliott, and Kenderes Tamas. Adds preliminary support for numerous accessories that use the ipod serial port on the dock connector. See IpodAccessories for a list of tested devices.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19585 a1c6a512-1295-4272-9138-f99709370657
2008-12-25 01:46:16 +00:00
Michael Sevakis
93572e2a9e Keyclick fixup take two. It is only 88 samples (2msec) long so keep a small static buffer around for beeps less than or equal to keyclick duration. This way it operates no matter the buffer state and still won't interfere with alternate PCM operations like recording or plugin playback.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19415 a1c6a512-1295-4272-9138-f99709370657
2008-12-13 06:01:08 +00:00
Michael Sevakis
826688e699 PCM buffer beeping needs the audio buffer reset in order to work after operations that trash the buffer or keyclick won't be audible until playback is restarted.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19413 a1c6a512-1295-4272-9138-f99709370657
2008-12-13 02:48:36 +00:00
Michael Sevakis
5e73f9ff20 Fix FS#8660-Recording hardlocks with keyclick enabled and FS#9388-keyclicks too late. Introduce audio_buffer_state to check whether PCM buffer is useable or disabled (trashed).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19411 a1c6a512-1295-4272-9138-f99709370657
2008-12-13 01:32:39 +00:00
Michael Sevakis
8cfbd3604f Use cookies for thread identification instead of pointers directly which gives a buffer against wrongly identifying a thread when the slot is recycled (which has been nagging me for awhile). A slot gets 255 uses before it repeats. Everything gets incompatible so a full update is required.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19377 a1c6a512-1295-4272-9138-f99709370657
2008-12-10 08:57:10 +00:00
Michael Sevakis
89da4328a0 Meg F/X can beep and click using a hardware timer so let us try it out. To match things up better, fix PCM beeping to give correct frequency (and get a pointer wrap bug too). Do some minor adjustments to compensate for corrections.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19355 a1c6a512-1295-4272-9138-f99709370657
2008-12-07 00:07:47 +00:00
Rafaël Carré
fb11a838eb playback: sanity check for pcmbuf_init() requirement (enabled in DEBUG)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19331 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 20:36:41 +00:00
Jonathan Gordon
7bc50d1aa5 Fix FS#8282 - if next-dir fails resume the old playlist
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19324 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 09:23:43 +00:00
Jonathan Gordon
8c23a36312 FS#8814 - remove the "restarting playback" splash because its pointless..
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19286 a1c6a512-1295-4272-9138-f99709370657
2008-12-01 12:08:29 +00:00
Frank Gevaerts
2f8a0081c6 Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do that, it also introduces sd_*, nand_*, and mmc_*.
This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
2008-11-01 16:14:28 +00:00
Magnus Holmgren
1b9991c229 Try to fix FS#9502: end playback properly if no valid files were found in a playlist.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18891 a1c6a512-1295-4272-9138-f99709370657
2008-10-26 20:15:10 +00:00
Jonathan Gordon
7b77910de4 fix FS#8124 - pressing STOP after seeking while paused causes playback to start again for a second or 2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18860 a1c6a512-1295-4272-9138-f99709370657
2008-10-22 09:59:42 +00:00
Nils Wallménius
2f50cd58b9 Codec memory reorganization
Based on a patch by Tomasz Malesinski
* Merge Codec buffer and Malloc buffer into one large buffer.
* The new merged buffer is now 1MB on targets with lots of memory.
* Renamed codec_get_memory to codec_get_buffer and made it behave more. 
like plugin_get_buffer.
* Bumped Codec api and min api versions.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18834 a1c6a512-1295-4272-9138-f99709370657
2008-10-19 12:35:53 +00:00
Jonathan Gordon
00a228fefb Accept FS#7482 by Klaas Bosteels - return the full path of a file which doesnt have valid tags yet (and use the end of the filename for the title) instead of before which was only using the filename
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18820 a1c6a512-1295-4272-9138-f99709370657
2008-10-16 11:11:45 +00:00
Jonathan Gordon
71898e5c54 Accept FS#9480 - centralise and organise the events in the apps/ layer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18819 a1c6a512-1295-4272-9138-f99709370657
2008-10-16 10:38:03 +00:00
Björn Stenberg
f30430f9a3 Added #include pcm_record.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18809 a1c6a512-1295-4272-9138-f99709370657
2008-10-14 12:15:14 +00:00