Exemplo n.º 1
0
Arquivo: wps.c Projeto: lyzkov/rockbox
void pause_action(bool may_fade, bool updatewps)
{
#if CONFIG_CODEC == SWCODEC
    /* Do audio first, then update, unless skin were to use its local
       status in which case, reverse it */
    audio_pause();

    if (updatewps)
        update_non_static();
#else
    if (may_fade && global_settings.fade_on_stop)
        fade(false, updatewps);
    else
        audio_pause();
#endif

    if (global_settings.pause_rewind) {
        long newpos;

#if (CONFIG_CODEC == SWCODEC)
        audio_pre_ff_rewind();
#endif
        newpos = audio_current_track()->elapsed
            - global_settings.pause_rewind * 1000;
        audio_ff_rewind(newpos > 0 ? newpos : 0);
    }

    (void)may_fade;
}
Exemplo n.º 2
0
/* takes care of seeking to a track in a playlist
 * returns false if audio  isn't playing */
static bool seek(unsigned long pos)
{
    if (!(audio_status() & AUDIO_STATUS_PLAY))
    {
        return false;
    }
    else
    {
#if (CONFIG_CODEC == SWCODEC)
        audio_pre_ff_rewind();
        audio_ff_rewind(pos);
#else
        audio_pause();
        audio_ff_rewind(pos);
        audio_resume();
#endif
        return true;
    }
}
Exemplo n.º 3
0
void ab_jump_to_A_marker(void)
{
#if (CONFIG_CODEC != SWCODEC)
    bool paused = (audio_status() & AUDIO_STATUS_PAUSE) != 0;
    if ( ! paused )
        audio_pause();
#endif
    audio_ff_rewind(ab_A_marker);
#if (CONFIG_CODEC != SWCODEC)
    if ( ! paused )
        audio_resume();
#endif
}