Index: apps/playback.c =================================================================== --- apps/playback.c (revision 14233) +++ apps/playback.c (working copy) @@ -268,6 +268,11 @@ static size_t high_watermark = 0; /* High watermark for rebuffer (A/V/other) */ #endif +/* bugfix tmp */ +#ifdef STOP_INSTEADOF_PAUSE +static unsigned long saved_offset = 0; +#endif + /* Multiple threads */ static void set_current_codec(int codec_idx); /* Set the watermark to trigger buffer fill (A/C) FIXME */ @@ -678,16 +683,27 @@ void audio_pause(void) { +#ifndef STOP_INSTEADOF_PAUSE LOGFQUEUE("audio >| audio Q_AUDIO_PAUSE"); /* Don't return until playback has actually paused */ queue_send(&audio_queue, Q_AUDIO_PAUSE, true); +#else + /* save the offset so that resume can function */ + struct mp3entry *id3 = audio_current_track(); + saved_offset = id3->offset; + audio_stop(); +#endif } void audio_resume(void) { +#ifndef STOP_INSTEADOF_PAUSE LOGFQUEUE("audio >| audio Q_AUDIO_PAUSE resume"); /* Don't return until playback has actually resumed */ queue_send(&audio_queue, Q_AUDIO_PAUSE, false); +#else + audio_play(saved_offset); +#endif } void audio_next(void) Index: firmware/export/config-ipodvideo.h =================================================================== --- firmware/export/config-ipodvideo.h (revision 14233) +++ firmware/export/config-ipodvideo.h (working copy) @@ -163,4 +163,8 @@ #define ICODE_ATTR_TREMOR_NOT_MDCT +/* define this to turn on "stop instead of pause" */ +/* this is used as a stopgap until the pause feature doesn't lock the ipod */ +#define STOP_INSTEADOF_PAUSE + #endif Index: apps/gui/gwps.c =================================================================== --- apps/gui/gwps.c (revision 14233) +++ apps/gui/gwps.c (working copy) @@ -146,11 +146,17 @@ /* did someone else (i.e power thread) change audio pause mode? */ if (wps_state.paused != audio_paused) { +#ifndef STOP_INSTEADOF_PAUSE wps_state.paused = audio_paused; - +#endif /* if another thread paused audio, we are probably in car mode, about to shut down. lets save the settings. */ +#ifndef STOP_INSTEADOF_PAUSE if (wps_state.paused) { +#else + if (audio_paused) { + wps_state.paused = true; +#endif settings_save(); #if !defined(HAVE_RTC_RAM) && !defined(HAVE_SW_POWEROFF) call_ata_idle_notifys(true); @@ -207,8 +213,16 @@ /* Exit if audio has stopped playing. This can happen if using the sleep timer with the charger plugged or if starting a recording from F1 */ + /* if STOP_INSTEADOF_PAUSE then we want to remain on wps screen + * if we were paused originally + */ +#ifndef STOP_INSTEADOF_PAUSE if (!audio_status()) +#else + if (!wps_state.paused && !audio_status()) +#endif exit = true; + #ifdef ACTION_WPSAB_SINGLE if (!global_settings.party_mode && ab_repeat_mode_enabled()) {