summaryrefslogtreecommitdiff
path: root/apps/codecs/ay.c
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-08-30 19:40:09 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-08-30 19:40:09 +0000
commite88d24a8407ee3fca32cf08399ce895c49c80fc0 (patch)
treec1f5b054ae0a80ab4b72f33547742577d34c48ec /apps/codecs/ay.c
parente66ad3e8a86a19b9ef9480bc52766e61955f341d (diff)
downloadrockbox-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/codecs/ay.c')
-rw-r--r--apps/codecs/ay.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/codecs/ay.c b/apps/codecs/ay.c
index 48261fbfb4..914ffa9803 100644
--- a/apps/codecs/ay.c
+++ b/apps/codecs/ay.c
@@ -17,8 +17,8 @@ static struct Ay_Emu ay_emu;
17static void set_codec_track(int t, int multitrack) { 17static void set_codec_track(int t, int multitrack) {
18 Ay_start_track(&ay_emu, t); 18 Ay_start_track(&ay_emu, t);
19 19
20 /* for REPEAT_ONE we disable track limits */ 20 /* for loop mode we disable track limits */
21 if (ci->global_settings->repeat_mode != REPEAT_ONE) { 21 if (!ci->loop_track()) {
22 Track_set_fade(&ay_emu, Track_get_length( &ay_emu, t ) - 4000, 4000); 22 Track_set_fade(&ay_emu, Track_get_length( &ay_emu, t ) - 4000, 4000);
23 } 23 }
24 if (multitrack) ci->set_elapsed(t*1000); /* t is track no to display */ 24 if (multitrack) ci->set_elapsed(t*1000); /* t is track no to display */
@@ -111,7 +111,7 @@ next_track:
111 ci->seek_complete(); 111 ci->seek_complete();
112 112
113 /* Set fade again */ 113 /* Set fade again */
114 if (ci->global_settings->repeat_mode != REPEAT_ONE) { 114 if (!ci->loop_track()) {
115 Track_set_fade(&ay_emu, Track_get_length( &ay_emu, track ) - 4000, 4000); 115 Track_set_fade(&ay_emu, Track_get_length( &ay_emu, track ) - 4000, 4000);
116 } 116 }
117 } 117 }