summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 13dcb5cca9..58d58788be 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -738,12 +738,17 @@ void settings_apply_play_freq(int value, bool playback)
738 bool changed = value != prev_setting; 738 bool changed = value != prev_setting;
739 prev_setting = value; 739 prev_setting = value;
740 740
741 long offset = 0; 741 unsigned long elapsed = 0;
742 unsigned long offset = 0;
742 bool playing = changed && !playback && 743 bool playing = changed && !playback &&
743 audio_status() == AUDIO_STATUS_PLAY; 744 audio_status() == AUDIO_STATUS_PLAY;
744 745
745 if (playing) 746 if (playing)
746 offset = audio_current_track()->offset; 747 {
748 struct mp3entry *id3 = audio_current_track();
749 elapsed = id3->elapsed;
750 offset = id3->offset;
751 }
747 752
748 if (changed && !playback) 753 if (changed && !playback)
749 audio_hard_stop(); 754 audio_hard_stop();
@@ -752,7 +757,7 @@ void settings_apply_play_freq(int value, bool playback)
752 mixer_set_frequency(play_sampr[value]); 757 mixer_set_frequency(play_sampr[value]);
753 758
754 if (playing) 759 if (playing)
755 audio_play(offset); 760 audio_play(elapsed, offset);
756} 761}
757#endif /* HAVE_PLAY_FREQ */ 762#endif /* HAVE_PLAY_FREQ */
758 763