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
Frank Gevaerts
46573019a5
add HAVE_DISK_STORAGE, and use that instead of HAVE_FLASH_STORAGE when checking for an actual disk (i.e. related to spindown, skipping,...)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18735 a1c6a512-1295-4272-9138-f99709370657
2008-10-07 19:37:33 +00:00
Nils Wallménius
01729e7a18
FS#9281 Rename of splash functions.
...
* Remove gui_splash()
* Rename gui_syncsplash() to splashf() and remove its voice
capabilities.
* Rename the internal splash() to splash_internal() and introduce an
externally visible splash() that handles simple splashing without
printf functionality e.g. splash(HZ, ID2P(LANG_FOO)); or splash(HZ,
"foo"); if a LANG_* id is passed it will be voiced.
* Adjust all places that called gui_syncsplash() to use the correct
variant from above.
* Export both new functions to plugins and adjust places calling
rb->splash() to use the correct variant so that we now have naming
consistency between the core and plugins.
* Fix one latent bug that would cause my sim to crash with the above
changes and correct P2STR and P2ID macros, thanks to pondlife.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18282 a1c6a512-1295-4272-9138-f99709370657
2008-08-15 08:27:39 +00:00
Stéphane Doyon
c893affeef
Accept FS#8918: Voice multiple thumbnails and talk race fixes.
...
-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
2008-07-15 14:06:11 +00:00
Nicolas Pennequin
f69982bb0b
Fix FS#8977. The issue was caused by multiple successive calls to audio_load_track() happening before the corresponding calls to audio_finish_load_track(), resulting in disappearing tracks. I added the track_load_started boolean flag as a means to prevent audio_load_track() from doing anything if a call to audio_finish_load_track is pending.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17891 a1c6a512-1295-4272-9138-f99709370657
2008-06-30 16:20:46 +00:00
Nicolas Pennequin
0441afecd7
Fix FS#9110 and its maybe-dupes.
...
The issue happened when the value of 'filling' was STATE_FINISHED: the low_buffer_callback wouldn't do anything even when there would still be data remaining to be buffered, leading to a shortage of audio data. Only making the callback act even when filling is STATE_FINISHED (the simple fix) isn't right because of cases when the last track in the playlist is fully buffered. Therefore I added a new state to distinguish between when the last track is fully buffered (STATE_FINISHED) and when it isn't (STATE_END_OF_PLAYLIST).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17875 a1c6a512-1295-4272-9138-f99709370657
2008-06-29 11:50:41 +00:00
Daniel Stenberg
2acc0ac542
Updated our source code header to explicitly mention that we are GPL v2 or
...
later. We still need to hunt down snippets used that are not. 1324 modified
files...
http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 18:10:04 +00:00
Nicolas Pennequin
ef5fa8eaf5
Restore Zagor's copyright from before the WPS tokenizer. I shouldn't have removed it. Also add mine in playback.c, alongside Slasheri's.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17368 a1c6a512-1295-4272-9138-f99709370657
2008-05-05 09:40:22 +00:00
Bertrik Sikken
c97e503a10
Cleaned up playblack.h header file and usage of it.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17276 a1c6a512-1295-4272-9138-f99709370657
2008-04-28 14:13:13 +00:00
Nicolas Pennequin
2cf6345a0e
bufgetid3 should be used carefully, as it can return NULL.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17143 a1c6a512-1295-4272-9138-f99709370657
2008-04-16 16:41:35 +00:00
Nicolas Pennequin
de026dcede
Fix FS#8902 (NSF files get skipped). The cause was too strict metadata checking (the NSF metadata parser doesn't fill the 'length' field). Hopefully there won't be any problems with that anymore.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17142 a1c6a512-1295-4272-9138-f99709370657
2008-04-16 16:18:05 +00:00
Nicolas Pennequin
babd3beee3
audio_current_track: take wps_offset into account when no buffered metadata is available, and avoid using playlist_peek, which hits on the disk when dircache isn't enabled. This should make skipping nicer.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17128 a1c6a512-1295-4272-9138-f99709370657
2008-04-15 20:59:47 +00:00
Nicolas Pennequin
b36d3c0be2
Some bugfixes after r17109:
...
* Fix FS#8893 by plugging a file descriptor leak in audio_load_track.
* Fix a possible null pointer dereference by not allowing audio_current_track to return NULL.
* Make audio_current_track return prevtrack_id3 only during an automatic track skip. Fixes the wrong metadata being displayed for a short time after a backwards skip.
-Cette ligne, et les suivantes ci-dessous, seront ignorées--
M apps/playback.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17126 a1c6a512-1295-4272-9138-f99709370657
2008-04-15 19:20:57 +00:00
Steve Bavin
e50202c5c4
Remove a global variable which is (hopefully) not needed. Also fixes a very minor bug where restarting playback after a playlist ends would play the final 3 seconds again.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17117 a1c6a512-1295-4272-9138-f99709370657
2008-04-15 12:38:17 +00:00
Nicolas Pennequin
4e2de44b44
A rather big change to how tracks are loaded: there are now two parts to the process and metadata loading is done by the buffering thread (except for the first unbuffered track). The audio thread now calls audio_load_track, and once the metadata is loaded, the buffering thread sends an event which will make the audio thread call audio_finish_load_track. This one then takes care of the rest of the loading.
...
This method makes skipping noticeably faster for unbuffered tracks, and especially backwards.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17109 a1c6a512-1295-4272-9138-f99709370657
2008-04-14 16:17:47 +00:00
Nicolas Pennequin
a5ad74ffca
Revert what was left of r17018 until I find a better way. It had quirks in some cases, and doesn't play well with what I'm about to commit.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17108 a1c6a512-1295-4272-9138-f99709370657
2008-04-14 15:51:40 +00:00
Nicolas Pennequin
3c9625969b
FS#8882: Fix the bug where skipping backwards with Ogg files could result in a skip forward (FS#8508). The problem was introduced by a one-line change in r16025, so we revert it. At the time I thought that line had become useless but obviously I was wrong. Thanks to Greg Erwin for finding the fix.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17107 a1c6a512-1295-4272-9138-f99709370657
2008-04-14 10:52:16 +00:00
Michael Giacomelli
9a946f6022
Commit FS#8822 by Magnus Holmgren. Fixes resuming previously playing WMA files after a reboot.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17090 a1c6a512-1295-4272-9138-f99709370657
2008-04-12 19:52:31 +00:00
Nicolas Pennequin
977069a41d
Bring the WPS playlist index display into sync with the track being played by using the index field of the ID3 info struct instead of directly asking the playlist code.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17018 a1c6a512-1295-4272-9138-f99709370657
2008-04-07 13:43:09 +00:00
Michael Sevakis
05099149f1
Enable nocache sections using the linker. PP5022/4 must use SW_CORELOCK now with shared variables in DRAM (it seems swp(b) is at least partially broken on all PP or I'm doing something very wrong here :\). For core-shared data use SHAREDBSS/DATA_ATTR. NOCACHEBSS/DATA_ATTR is available whether or not single core is forced for static peripheral-DMA buffer allocation without use of the UNCACHED_ADDR macro in code and is likely useful on a non-PP target with a data cache (although not actually enabled in config.h and the .lds's in this commit).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16981 a1c6a512-1295-4272-9138-f99709370657
2008-04-06 04:34:57 +00:00
Nicolas Pennequin
fe9eb68ec0
Fix FS#8513 (Playback occasionally repeats a track when rebuffering occurs) and hopefully others by essentially reverting r16019, parts of r16425 and most bugfix followups. This means we're back to having a desynchronized playlist index in the WPS. audio_check_new_track() needs a serious rework before we can make improvements in that area without breaking things.
...
playlist_checkend() isn't used anymore but I'm not removing it for now because it might prove useful later on.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16955 a1c6a512-1295-4272-9138-f99709370657
2008-04-03 21:40:07 +00:00
Nicolas Pennequin
33f522de8b
Migrate the buffering code to the new events system.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16950 a1c6a512-1295-4272-9138-f99709370657
2008-04-03 17:51:53 +00:00
Nicolas Pennequin
a3ed95247c
Fix an issue introduced by r16930 where rebuffering would happen one track too early because track were counted after moving to the next one instead of before.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16948 a1c6a512-1295-4272-9138-f99709370657
2008-04-03 15:30:42 +00:00
Nicolas Pennequin
73a71a4712
Move audio_set_elapsed to mpa.c, as recommended by the TODO note. Please correct me if affecting ci->id3->elapsed directly (ie without using ci->set_elapsed) is wrong.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16945 a1c6a512-1295-4272-9138-f99709370657
2008-04-03 12:13:03 +00:00
Nicolas Pennequin
bb40e6ed15
Fix a possible (though unlikely) deadlock condition spotted by jhMikeS. It would involve both the buffering and the audio thread sending synchronous messages to one another.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16931 a1c6a512-1295-4272-9138-f99709370657
2008-04-02 17:18:15 +00:00
Nicolas Pennequin
03b54c29d7
Fix for FS#8601 by pondlife: the disk no longer spins up on a track change when dircache is disabled. This issue was introduced by me in r16019 by adding a call to playlist_peek() in audio_check_new_track(). This fix adds a new playlist API call to work around the problem until we find a better solution. There are also a few simplifications and comment corrections.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16930 a1c6a512-1295-4272-9138-f99709370657
2008-04-02 17:04:59 +00:00
Andree Buschmann
63acf3eb16
Fixes FS#8597 (dropouts while crossfading) via keeping CPU boosted while crossfading is active.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16889 a1c6a512-1295-4272-9138-f99709370657
2008-03-30 10:08:08 +00:00
Nicolas Pennequin
12b6c847c5
Fix sim warnings.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16881 a1c6a512-1295-4272-9138-f99709370657
2008-03-29 17:40:04 +00:00
Nicolas Pennequin
732df386af
Boost the audio thread while it's filling the buffer. In the audio and the buffering threads, only cancel cpu boost when not filling.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16880 a1c6a512-1295-4272-9138-f99709370657
2008-03-29 17:28:30 +00:00
Nicolas Pennequin
b71cbd599b
Use queue_empty instead of queue_peek again now that we don't care about the event type anymore.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16876 a1c6a512-1295-4272-9138-f99709370657
2008-03-29 13:32:37 +00:00
Michael Sevakis
4855e734f3
Move codec_get_file_pos somewhere else like the comment said should be done. Codec API version increment was needed so update all codecs.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16874 a1c6a512-1295-4272-9138-f99709370657
2008-03-29 06:36:53 +00:00
Nicolas Pennequin
f68147e5eb
Track playback filling state with a state-machine approach. There shouldn't be any change in behaviour but things are simpler.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16868 a1c6a512-1295-4272-9138-f99709370657
2008-03-28 20:18:53 +00:00
Steve Bavin
135cc757bd
Revert my earlier const madness, we'll keep the parameter lists simple.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16863 a1c6a512-1295-4272-9138-f99709370657
2008-03-28 12:51:33 +00:00
Steve Bavin
3d0b7c6901
Oops, another pondlife puddle of red.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16862 a1c6a512-1295-4272-9138-f99709370657
2008-03-28 11:43:08 +00:00
Steve Bavin
c9df8fd87b
The const police raid playback.c, should be no change to behaviour.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16860 a1c6a512-1295-4272-9138-f99709370657
2008-03-28 11:24:24 +00:00
Steve Bavin
76691030da
Oops, more red. That can't be static yet.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16803 a1c6a512-1295-4272-9138-f99709370657
2008-03-25 19:46:35 +00:00
Steve Bavin
38ed901284
A little more consting/staticing, no functional change.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16801 a1c6a512-1295-4272-9138-f99709370657
2008-03-25 19:26:00 +00:00
Michael Sevakis
27cf677339
Add a complete priority inheritance implementation to the scheduler (all mutex ownership and queue_send calls are inheritable). Priorities are differential so that dispatch depends on the runnable range of priorities. Codec priority can therefore be raised in small steps (pcmbuf updated to enable). Simplify the kernel functions to ease implementation and use the same kernel.c for both sim and target (I'm tired of maintaining two ;_). 1) Not sure if a minor audio break at first buffering issue will exist on large-sector disks (the main mutex speed issue was genuinely resolved earlier). At this point it's best dealt with at the buffering level. It seems a larger filechunk could be used again. 2) Perhaps 64-bit sims will have some minor issues (finicky) but a backroll of the code of concern there is a 5-minute job. All kernel objects become incompatible so a full rebuild and update is needed.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16791 a1c6a512-1295-4272-9138-f99709370657
2008-03-25 02:34:12 +00:00
Jonathan Gordon
a67e5d89ef
It makes more sense for the callback registrar to decide if its a "oneshot" then the callback caller.
...
(Doing it this way means playback could(/should?) registar a disk spinup callback at init which is called every spinup without needing to be reregistered)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16685 a1c6a512-1295-4272-9138-f99709370657
2008-03-17 05:22:53 +00:00
Miika Pekkarinen
19c6e66c13
Implement the playback event handling as a system-wide multi-purpose event system. Unified mpeg.c and playback.c audio event handling. Converted ata_idle_notify to use the new event handling system also.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16682 a1c6a512-1295-4272-9138-f99709370657
2008-03-16 13:55:16 +00:00
Miika Pekkarinen
6ab1c90513
FS#8707 - Enable "Load to RAM" (HAS_TC_RAMCACHE) compilation without Directory Cache (HAS_DIRCACHE).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16594 a1c6a512-1295-4272-9138-f99709370657
2008-03-09 20:33:19 +00:00
Jens Arnold
8c6920e343
Revert accidental tree commit. Sorry for that.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16574 a1c6a512-1295-4272-9138-f99709370657
2008-03-08 23:50:55 +00:00
Jens Arnold
d1ed7c37b1
No need to have \n here. panicf() won't output it anyway.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16570 a1c6a512-1295-4272-9138-f99709370657
2008-03-08 23:34:43 +00:00
Miika Pekkarinen
d8204fa11e
Simplified the playback engine more and removed unnecessary code.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16552 a1c6a512-1295-4272-9138-f99709370657
2008-03-08 08:05:29 +00:00
Miika Pekkarinen
2ccdc48ee9
Rewritten playback event handling. Should fix runtime statistics gathering.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16546 a1c6a512-1295-4272-9138-f99709370657
2008-03-07 22:56:51 +00:00
Nicolas Pennequin
0fd6a04eee
Pragmatic fix for FS#8681 (logf breaks scrobbling). The correct fix is a better event mechanism but scrobbling is currently the only track_changed_event consumer so I'll wait til I have more time.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16520 a1c6a512-1295-4272-9138-f99709370657
2008-03-04 22:35:51 +00:00
Magnus Holmgren
c8d2a2458d
Fix FS#8675: Last song in playlist ends prematurely.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16518 a1c6a512-1295-4272-9138-f99709370657
2008-03-04 18:56:37 +00:00
Steve Bavin
018de3591c
Slightly simpler mechanism to avoid Q_AUDIO_FILL_BUFFER floods.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16497 a1c6a512-1295-4272-9138-f99709370657
2008-03-03 12:01:29 +00:00
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