Steve Bavin
bda6f573da
Fix odd behaviour when rebuffering occurs during playback. This is hopefully the last nail in the coffins of FS#8455 and FS#8513, but I'll let some FLAC and Ogg users be the judge of that.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16459 a1c6a512-1295-4272-9138-f99709370657
2008-02-29 23:27:55 +00:00
Michael Sevakis
f38274f2f9
Use a safe way to get pcm buffer track change notifications to the audio thread.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16450 a1c6a512-1295-4272-9138-f99709370657
2008-02-28 22:37:46 +00:00
Magnus Holmgren
00b722ff22
Fix bookmark resume when a track is playing.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16445 a1c6a512-1295-4272-9138-f99709370657
2008-02-28 17:40:31 +00:00
Nicolas Pennequin
3987166a0a
Fix auto dir change happening one track too early (another followup of r16425).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16430 a1c6a512-1295-4272-9138-f99709370657
2008-02-26 20:29:52 +00:00
Nicolas Pennequin
a36dbaa2c4
Fix not being able to skip to the last track in a playlist.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16426 a1c6a512-1295-4272-9138-f99709370657
2008-02-26 17:55:18 +00:00
Nicolas Pennequin
b834e25d71
Attempt to make manual track skips more responsive and more robust
...
* Immediately update the playlist index on manual track skip
* Try to minimise the number of calls to audio_fill_file_buffer
Hopefully fixes FS#8320.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16425 a1c6a512-1295-4272-9138-f99709370657
2008-02-26 17:15:35 +00:00
Nicolas Pennequin
f730133e04
Factor out duplicate code from audio_prev and audio_next
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16424 a1c6a512-1295-4272-9138-f99709370657
2008-02-26 17:15:33 +00:00
Nicolas Pennequin
ea9e02b442
Make audio_next_track use the wps_offset value.
...
This removes the delay between the current track title change and the next
track title change in the WPS on a track skip.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16423 a1c6a512-1295-4272-9138-f99709370657
2008-02-26 17:15:30 +00:00
Magnus Holmgren
68f9e6bfee
When starting playback, prevent the codec from starting to decode too early, which would cause rebuffering (slowing things down) and incorrect playlist index. Hopefully fixes a bunch of playback-related bugs, such as FS#8520, FS#8525, FS#8555 and possibly FS#8511.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16392 a1c6a512-1295-4272-9138-f99709370657
2008-02-23 17:46:33 +00:00
Nicolas Pennequin
ca243ce494
Fix FS#5797 (Codec failure with directory skip when in file browser, with dircache enabled). Marking the tree context to be reloaded too early would cause the new playlist to contain files that don't exist (correct directory but wrong filenames), in turn causing the codec failures. The fix is to call reload_directory() after the playlist has been created.
...
I also added a sanity check to avoid loading an unknown codec, which was happening as a consequence of this issue.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16039 a1c6a512-1295-4272-9138-f99709370657
2008-01-09 20:37:36 +00:00
Nicolas Pennequin
659fe5a35b
Fix FS#6215 (player crashes after trying to resume deleted music file). As mentioned in the lastest comment, the problem was in trying to resume at an offset larger than the size of the file following the one that was deleted. This revealed a crash in the buffering code, which gets a fix, but we also need to intervene earlier in the track loading so that the track that gets played will be from its start.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16028 a1c6a512-1295-4272-9138-f99709370657
2008-01-08 23:48:51 +00:00
Brandon Low
5fd859b68a
Take out some no longer needed (and overly complicated) comments, thanks to Nico_P
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16027 a1c6a512-1295-4272-9138-f99709370657
2008-01-08 18:26:17 +00:00
Nicolas Pennequin
3d7f64c615
Fix FS#2687 (Rewinding at end of song confuses playback) by making the codec skip back if the user seeks during the transition window. This also completely fixes the small glitch in the progressbar when a user skipped back to a buffered song.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16025 a1c6a512-1295-4272-9138-f99709370657
2008-01-08 14:29:11 +00:00
Nicolas Pennequin
d5b96f5e16
Make the playlist index be incremented after the PCM track change. This fixes FS#8206. Special treatment is required to avoid breaking auto dir change.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16019 a1c6a512-1295-4272-9138-f99709370657
2008-01-07 22:05:58 +00:00
Brandon Low
3386dd7be9
Fix FS8069, because Nico_P made it easy
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15840 a1c6a512-1295-4272-9138-f99709370657
2007-11-28 04:58:16 +00:00
Nicolas Pennequin
e24454f8b3
Buffering callbacks rework. There is now one callback for all the events that can occur. Callbacks are now registred only once instead of being removed after having been called.
...
Fix FS#8092 by flushing the audio when a rebuffer is needed.
Also add some comments here and there.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15816 a1c6a512-1295-4272-9138-f99709370657
2007-11-26 21:13:08 +00:00
Dan Everton
d7e1f77146
Commit FS#7440. The iPod Video doesn't actually have a hardware equalizer. It does have hardware bass/treble settings with configurable cutoff. So make the bass/treble settings use the hardware and remove the hardware equalizer configuration.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15782 a1c6a512-1295-4272-9138-f99709370657
2007-11-24 07:51:00 +00:00
Robert Kukla
a334bd2891
revise commit r15463 - we still get the immediate display of runtime data in the wps, but avoid unnecessary calls while initialising/updating the database.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15781 a1c6a512-1295-4272-9138-f99709370657
2007-11-23 23:36:42 +00:00
Robert Kukla
5ee2e372f5
Save runtime info for last track in playlist as well (FS#8040)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15767 a1c6a512-1295-4272-9138-f99709370657
2007-11-23 01:09:49 +00:00
Nicolas Pennequin
c44d2bd4cb
Fix FS#8201 and correct fix for FS#8040 by making the track unbuffer callback be called from where it should be: clear_track_info, and writing track metadata back to the main buffer *before* the callback is called and the track erased. This simplifies audio_clear_track_entries.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15748 a1c6a512-1295-4272-9138-f99709370657
2007-11-22 00:20:37 +00:00
Michael Sevakis
398d9fd8b4
Hopefully the last word on getting rid of yield_codecs loops (cut read chunk to 16kB). Sansa ata driver also didn't yield enough so buffering would starve other threads. Bump priority of audio thread to keep UI more responsive.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15724 a1c6a512-1295-4272-9138-f99709370657
2007-11-20 22:45:46 +00:00
Michael Sevakis
fadbf0a6f7
Make threads responsible for explicit cancellation of their own boosted status. Sleeping and timeouts will no longer cancel it.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15709 a1c6a512-1295-4272-9138-f99709370657
2007-11-20 03:44:25 +00:00
Nicolas Pennequin
2ff513237d
Fix FS#8040 (Gather Runtime Data not working) the right way. Also a few cosmetic changes and comments.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15696 a1c6a512-1295-4272-9138-f99709370657
2007-11-19 17:30:46 +00:00
Nicolas Pennequin
d3b8245ca8
Second part of FS#8104 by Bertrik Sikken: Simplification of audio_track_count, audio_have_tracks and audio_have_free_tracks. This hopefully won't affect anything, but the semantics of the functions have changed slightly.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15693 a1c6a512-1295-4272-9138-f99709370657
2007-11-19 16:37:52 +00:00
Nicolas Pennequin
cfa6495356
First part of FS#8104 by Bertrik Sikken: Simplification and consistency improvement for the track index incrementations. There should be no functional change.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15688 a1c6a512-1295-4272-9138-f99709370657
2007-11-19 15:52:25 +00:00
Michael Sevakis
4f2473db6c
Do the wait for the audio thread init in such a way to avoid an unlikely but possible roundabout deadlock. Not pretty but will suffice for the moment.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15686 a1c6a512-1295-4272-9138-f99709370657
2007-11-19 13:26:46 +00:00
Michael Sevakis
d6f2a54654
Make sure initial menu item is voiced at startup. Voice thread must wait for the audio thread to finish initializing hardware. A known issue at speex commit time (perhaps only by myself ;). The behavioral refinement time begins.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15682 a1c6a512-1295-4272-9138-f99709370657
2007-11-19 11:59:52 +00:00
Michael Sevakis
99617d71ba
Make speex the new voice format for SWCODEC targets (non-Archos). Remove codec swapping and build speex voice decoding directly into the core binary.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15668 a1c6a512-1295-4272-9138-f99709370657
2007-11-18 17:12:19 +00:00
Nicolas Pennequin
9446226276
Erase lasttrack_id3 when end-of-playlist is reached. Fixes FS#8148.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15659 a1c6a512-1295-4272-9138-f99709370657
2007-11-18 13:41:04 +00:00
Brandon Low
d1c6d53962
I'm a retard, this is definitely more correct
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15627 a1c6a512-1295-4272-9138-f99709370657
2007-11-14 22:34:32 +00:00
Brandon Low
02467cffa0
Might fix FS#8158, I was unable to reproduce so no guarantee.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15626 a1c6a512-1295-4272-9138-f99709370657
2007-11-14 22:29:26 +00:00
Nicolas Pennequin
4963925767
Fix another NULL pointer dereference crash.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15591 a1c6a512-1295-4272-9138-f99709370657
2007-11-12 00:17:55 +00:00
Nicolas Pennequin
e71bc67d94
Fix an issue that appeared in r15577, where skipping back to a track that has no audio data left, but still has its metadata and album art, would fail. The fix is to also clear the filesize member (as it should have been previously) to force a rebuffer when skipping back. To prevent the album art bitmap from flashing on the back skip, the whole track info struct is cleared when the track isn't needed anymore, i.e. after the PCM track change.
...
Also a slightly unrelated but trivial change: only load album art if it's not already loaded.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15588 a1c6a512-1295-4272-9138-f99709370657
2007-11-11 21:27:18 +00:00
Nicolas Pennequin
95db8f8022
Load the album art before the codec because find_albumart would yield to the codec, which would start requesting data before the audio handle is ready.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15584 a1c6a512-1295-4272-9138-f99709370657
2007-11-11 20:09:13 +00:00
Nicolas Pennequin
496027d8bb
* Make the album art be updated on PCM track change, not codec track change (changes in audio_current_aa_hid).
...
* On codec track change, if not all the audio data is present, only get rid of the audio data and not all the track's handles. This will prevent alum art from disappearing on codec track change after resuming playback (changes in audio_check_new_track).
* Add audio_finalise_track_change() to handle what happens after the PCM track change (no functional change here).
* Add some comments about how the track transition works.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15577 a1c6a512-1295-4272-9138-f99709370657
2007-11-11 15:50:52 +00:00
Nicolas Pennequin
cf37f4c079
Fix red.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15573 a1c6a512-1295-4272-9138-f99709370657
2007-11-11 12:52:07 +00:00
Nicolas Pennequin
9d4bed7ff0
Album art support. Based on FS#3045, but heavily modified to adapt to MoB and for cleanness.
...
The cover pictures are loaded from external bitmaps. JPEG and embedded art are not supported. The pictures will only be drawn on the main display. There is no resizing but it is possible to specify the WPS bitmap size in the bitmap names (e.g. cover.100x100.bmp).
The bitmaps are stored in the main buffer and read directly from there. Currently, duplicate bitmaps will simply be present several times in the buffer, but this will be improved.
To enable for a target, #define HAVE_ALBUMART in its config file.
For more information, see the wiki page: http://www.rockbox.org/wiki/AlbumArt .
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15572 a1c6a512-1295-4272-9138-f99709370657
2007-11-11 12:29:37 +00:00
Nicolas Pennequin
a677678e31
Fix a possible NULL pointer dereference I introduced in r15503 by making an unwise assumption. This would cause crashes on track skip in certain (very unlikely, I think) situations.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15557 a1c6a512-1295-4272-9138-f99709370657
2007-11-10 18:22:55 +00:00
Nicolas Pennequin
941600f121
Remove nexttrack_id3 and instead use the metadata present on the buffer.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15540 a1c6a512-1295-4272-9138-f99709370657
2007-11-08 17:27:43 +00:00
Nicolas Pennequin
12d479fd3e
Store the metadata of the first unbuffered track in a static struct so that it gets displayed in the next track info while playing the last buffered track.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15539 a1c6a512-1295-4272-9138-f99709370657
2007-11-08 16:52:29 +00:00
Nicolas Pennequin
fbdc0e6b57
Fix warning.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15504 a1c6a512-1295-4272-9138-f99709370657
2007-11-07 01:10:53 +00:00
Nicolas Pennequin
5f7d21dfa0
Fix tracks always being cleared on skip (reported by dionoea). The problem was that skipping the ID3 info from the beginning caused the offset to always be nonzero.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15503 a1c6a512-1295-4272-9138-f99709370657
2007-11-07 00:59:42 +00:00
Brandon Low
405380e57f
Don't keep resetting to default watermark during buffering, only do it once at play start
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15485 a1c6a512-1295-4272-9138-f99709370657
2007-11-05 18:54:22 +00:00
Nicolas Pennequin
aef008b061
Set all track handles to -1 on audio init to avoid calling bufclose(0) on all of them on the first playback stop. This also revealed a bug in audio_release_tracks where it wouldn't release all the tracks because the wrong #define value was used.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15484 a1c6a512-1295-4272-9138-f99709370657
2007-11-05 18:46:25 +00:00
Nicolas Pennequin
6631e36fa7
Fix some logf warnings.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15483 a1c6a512-1295-4272-9138-f99709370657
2007-11-05 18:19:38 +00:00
Brandon Low
3379440a4b
Remove conf_filechunk, it should never have been a setting and its implementation doesn't do what it claims any way
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15478 a1c6a512-1295-4272-9138-f99709370657
2007-11-05 17:48:21 +00:00
Brandon Low
1df1e7b0c7
Remove unused conf_preseek from buffering.c and all of its accountraments. This is _not_ a setting. This is a guessing tool used by either playback or buffering to serve its clients better. Use the REBUFFER_GUESS size in resume to help obviate pondlife's bug. This will also need to be used when FS8092 gets fixed correctly with a complete rebuffer for backward movements. It may also belong in buffering not playback, haven't decided for sure
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15475 a1c6a512-1295-4272-9138-f99709370657
2007-11-05 16:02:12 +00:00
Brandon Low
d02b5c744e
Don't keep useless id3v2 or other leading tag data on the buffer, it could be large
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15465 a1c6a512-1295-4272-9138-f99709370657
2007-11-05 01:56:12 +00:00
Brandon Low
31c1164c49
make handle_id of zero valid, stop using memsets to clear tracks, should be no functional changes
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15462 a1c6a512-1295-4272-9138-f99709370657
2007-11-04 19:01:02 +00:00
Brandon Low
f906498786
OTher part of previous
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15450 a1c6a512-1295-4272-9138-f99709370657
2007-11-04 05:36:35 +00:00