summaryrefslogtreecommitdiffstats
path: root/apps/playback.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 8e18a479b9..7bb78c98a7 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -3769,20 +3769,12 @@ void audio_set_cuesheet(bool enable)
}
#ifdef HAVE_DISK_STORAGE
-/* Set the audio antiskip buffer margin by index */
-void audio_set_buffer_margin(int setting)
+/* Set the audio antiskip buffer margin in SECONDS */
+void audio_set_buffer_margin(int seconds)
{
- static const unsigned short lookup[] =
- { 5, 15, 30, 60, 120, 180, 300, 600 };
-
- if ((unsigned)setting >= ARRAYLEN(lookup))
- setting = 0;
-
- logf("buffer margin: %u", (unsigned)lookup[setting]);
-
- LOGFQUEUE("audio > audio Q_AUDIO_UPDATE_WATERMARK: %u",
- (unsigned)lookup[setting]);
- audio_queue_post(Q_AUDIO_UPDATE_WATERMARK, lookup[setting]);
+ logf("buffer margin: %u", (unsigned) seconds);
+ LOGFQUEUE("audio > audio Q_AUDIO_UPDATE_WATERMARK: %u",(unsigned) seconds);
+ audio_queue_post(Q_AUDIO_UPDATE_WATERMARK, (unsigned) seconds); /*SECONDS*/
}
#endif /* HAVE_DISK_STORAGE */