From e88d24a8407ee3fca32cf08399ce895c49c80fc0 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Tue, 30 Aug 2011 19:40:09 +0000 Subject: Submit parts of FS#12189 regarding codec API. Replaces access to global settings with a dedicated function to determine if the current track shall be looped. Used by several synthesizer codecs. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30391 a1c6a512-1295-4272-9138-f99709370657 --- apps/codec_thread.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'apps/codec_thread.c') diff --git a/apps/codec_thread.c b/apps/codec_thread.c index 199bb0e742..90cf07be9f 100644 --- a/apps/codec_thread.c +++ b/apps/codec_thread.c @@ -30,6 +30,7 @@ #include "buffering.h" #include "dsp.h" #include "metadata.h" +#include "settings.h" /* Define LOGF_ENABLE to enable logf output in this file */ /*#define LOGF_ENABLE*/ @@ -405,6 +406,11 @@ static enum codec_command_action } } +static bool codec_loop_track_callback(void) +{ + return global_settings.repeat_mode == REPEAT_ONE; +} + /* Initialize codec API */ void codec_init_codec_api(void) { @@ -421,6 +427,7 @@ void codec_init_codec_api(void) ci.set_offset = audio_codec_update_offset; ci.configure = codec_configure_callback; ci.get_command = codec_get_command_callback; + ci.loop_track = codec_loop_track_callback; } -- cgit v1.2.3