FS#2886 - slow pause because two bad settings_save() in gui_wps_show()

Attached to Project: Rockbox
Opened by Thomas Kobler (kobler) - Thursday, 05 January 2006, 22:06 GMT
Last edited by Thomas Kobler (kobler) - Sunday, 08 January 2006, 10:46 GMT
Task Type Bugs
Category User Interface
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


at the start of the loop in gui_wps_show()(while(1)) at
first the audio_paused status is determined. But
because the audio_status() function takes a while
before it returns AUDIO_STATUS_PAUSED (when 'PAUSE' is
pressed and audio_pause() called). The wps_state.paused
is first changed back to false, the settings get saved
again, ata_flush, etc., and all this once more when the
audio_status() finaly returns AUDIO_STATUS_PAUSED.
This behaviour only shows up, when Fading on Stop/pause
is switched of and maybe without a peak meter.
The wrong assumtion probably is, that, when
audio_pause() ist called, audio_status() imediately
returns AUDIO_STATUS_PAUSED. This is not true as far as
I can see.

When moving the check for external pause status change
*after* the wait(for key) it works better! The
unnecessary settings_save, etc. only happen at the
first 'pause' after starting to play. Then it works. If
you want to have a patch, I'll try to isolate my 90% fix.
This task depends upon

Closed by  Christi Scarborough (christi-s)
Sunday, 19 March 2006, 13:01 GMT
Reason for closing:  Fixed
Additional comments about closing:  Please re-open if this is still a problem.
Comment by Linus Nielsen Feltzing (linusnielsen) - Friday, 06 January 2006, 09:50 GMT

It would surely be nice if you created a patch. Thanks.
Comment by Thomas Kobler (kobler) - Friday, 06 January 2006, 10:37 GMT

The pause sync check is split into a part before the loop
and one after the timeout/wait_for_key. With this the
chances that audio_status() returns the correct pause state
is much better, cause it is not called immediately after
I didn't check in detail with fade(). Probably the problem
exist there, too.
Comment by Thomas Kobler (kobler) - Sunday, 08 January 2006, 10:46 GMT

now the patch, really 8-/