diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-08-30 19:40:09 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-08-30 19:40:09 +0000 |
commit | e88d24a8407ee3fca32cf08399ce895c49c80fc0 (patch) | |
tree | c1f5b054ae0a80ab4b72f33547742577d34c48ec /apps/codec_thread.c | |
parent | e66ad3e8a86a19b9ef9480bc52766e61955f341d (diff) | |
download | rockbox-e88d24a8407ee3fca32cf08399ce895c49c80fc0.tar.gz rockbox-e88d24a8407ee3fca32cf08399ce895c49c80fc0.zip |
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
Diffstat (limited to 'apps/codec_thread.c')
-rw-r--r-- | apps/codec_thread.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 @@ | |||
30 | #include "buffering.h" | 30 | #include "buffering.h" |
31 | #include "dsp.h" | 31 | #include "dsp.h" |
32 | #include "metadata.h" | 32 | #include "metadata.h" |
33 | #include "settings.h" | ||
33 | 34 | ||
34 | /* Define LOGF_ENABLE to enable logf output in this file */ | 35 | /* Define LOGF_ENABLE to enable logf output in this file */ |
35 | /*#define LOGF_ENABLE*/ | 36 | /*#define LOGF_ENABLE*/ |
@@ -405,6 +406,11 @@ static enum codec_command_action | |||
405 | } | 406 | } |
406 | } | 407 | } |
407 | 408 | ||
409 | static bool codec_loop_track_callback(void) | ||
410 | { | ||
411 | return global_settings.repeat_mode == REPEAT_ONE; | ||
412 | } | ||
413 | |||
408 | /* Initialize codec API */ | 414 | /* Initialize codec API */ |
409 | void codec_init_codec_api(void) | 415 | void codec_init_codec_api(void) |
410 | { | 416 | { |
@@ -421,6 +427,7 @@ void codec_init_codec_api(void) | |||
421 | ci.set_offset = audio_codec_update_offset; | 427 | ci.set_offset = audio_codec_update_offset; |
422 | ci.configure = codec_configure_callback; | 428 | ci.configure = codec_configure_callback; |
423 | ci.get_command = codec_get_command_callback; | 429 | ci.get_command = codec_get_command_callback; |
430 | ci.loop_track = codec_loop_track_callback; | ||
424 | } | 431 | } |
425 | 432 | ||
426 | 433 | ||