FS#9114 - Pause Between Tracks
Attached to Project:
Rockbox
Opened by Linus Nielsen Feltzing (linusnielsen) - Tuesday, 24 June 2008, 10:22 GMT
Opened by Linus Nielsen Feltzing (linusnielsen) - Tuesday, 24 June 2008, 10:22 GMT
|
DetailsThis patch adds a new playback option, Pause Between Tracks. It pauses the playback automatically after each track, and the user must press Play to play the next.
This is useful for e.g dance classes, sound effects etc. There is a noticeable lag in the simulator, where it starts the playback of the next song before pausing, but who cares? It seems to work fine on the target anyway. Try it! |
This task depends upon
Edit: It only gives the warning, failing had another reason).
I'll fix the warnings, though.
I'd personally/selfishly prefer to keep playback.c and HWCODEC apart, because I have no HWCODEC target to test with.
Real Life is such an intrusive thing.
I not completely agree with the last check: also during a party I would like to play a track and pause at the end.
I think the 2 settings could survive independently. ;-)
If party mode wins, then pause between track should be disabled; this means that it should disappear from the related menu (I didn't remember of any menu entry showed as "disabled").
If pause between tracks wins, then it should enable the only key(s) to allow the desired behaviour (just play, I suppose).
But who decide which will be stronger? The developer, a poll, or YACS (yet another configuration setting)? ;-)
Something like: off, on but in party mode, always on.
In my opinion Party mode should take precedence over *everything* which interferes with music playback being continuous.
I can see a use for a mode where any track that starts playing should not be interrupted, which could coexist (and be useful) with pause between tracks, but I don't think that's the same as party mode.
so the needed changes:
1) get the callback/event stuff out of playback.c, either into a new file or I tihnk playlist.c makes more sense (its a playlist mode just as much a playback mode... or even in the menus file and fix the setting callback to do the initialisation)
2) change audio_pause() to audio_pause(bool block) which calls queue_post() instead of queue_send() so both hwcodec and swcodec can use the same codepath in the event callback (I have no idea why audio_pause() currently blocks...
I don't think playback.c should need changing for this feature - assuming there's already an end-of-track event you can use (i.e. aftert the PCM output is done, might need to check how crossfade reacts too).
This is more a UI-level feature in terms of the code structure, I'd think. Maybe it could go in playlist.c, though that's a bit of a mess (or was last time I looked).
Sorry - not wishing to be a monstrous killjoy, just wishing to keep the code structured right.. I'm happy to have a look at this over Christmas week if needed (and I can get near a PC).
It works, but it has a bug: if pause between tracks is enabled, inserting something in the playlist when a track is playing, it pauses current track, even if the end is not reached.
I managed to use it on Rockbox 3.7 : it compiled and seems to work like a charm.
It's a feature I was missing : I'm really happy to have it now :-)
That's something I love about free software : I have bought this Archos Jukebox Recorder v1 more than 10 years ago and I still can upgrade it, and modify its software to fit my needs.
It Rockbox did not exist, I would still be stuck with this basic and buggy firmware that was originally on the device.
I don't like to trash an item that works and can still be usefull. After all these years, I still can use my device, and rockbox trully expanded its software capabilities
Thanks to all the people who worked on this project