summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/adx.c2
-rw-r--r--apps/codecs/ay.c6
-rw-r--r--apps/codecs/gbs.c4
-rw-r--r--apps/codecs/hes.c4
-rw-r--r--apps/codecs/kss.c2
-rw-r--r--apps/codecs/nsf.c4
-rw-r--r--apps/codecs/sgc.c2
-rw-r--r--apps/codecs/spc.c10
-rw-r--r--apps/codecs/vgm.c2
9 files changed, 18 insertions, 18 deletions
diff --git a/apps/codecs/adx.c b/apps/codecs/adx.c
index 8144d5f468..cc7f0320be 100644
--- a/apps/codecs/adx.c
+++ b/apps/codecs/adx.c
@@ -239,7 +239,7 @@ enum codec_status codec_run(void)
239 if (bufoff > end_adr-18*channels && looping) { 239 if (bufoff > end_adr-18*channels && looping) {
240 DEBUGF("ADX: loop!\n"); 240 DEBUGF("ADX: loop!\n");
241 /* check for endless looping */ 241 /* check for endless looping */
242 if (ci->global_settings->repeat_mode==REPEAT_ONE) { 242 if (ci->loop_track()) {
243 loop_count=0; 243 loop_count=0;
244 fade_count = -1; /* disable fade */ 244 fade_count = -1; /* disable fade */
245 } else { 245 } else {
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 }
diff --git a/apps/codecs/gbs.c b/apps/codecs/gbs.c
index 5d3154911b..c9c3420683 100644
--- a/apps/codecs/gbs.c
+++ b/apps/codecs/gbs.c
@@ -17,8 +17,8 @@ static struct Gbs_Emu gbs_emu;
17static void set_codec_track(int t) { 17static void set_codec_track(int t) {
18 Gbs_start_track(&gbs_emu, t); 18 Gbs_start_track(&gbs_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(&gbs_emu, Track_get_length( &gbs_emu, t ), 4000); 22 Track_set_fade(&gbs_emu, Track_get_length( &gbs_emu, t ), 4000);
23 } 23 }
24 ci->set_elapsed(t*1000); /* t is track no to display */ 24 ci->set_elapsed(t*1000); /* t is track no to display */
diff --git a/apps/codecs/hes.c b/apps/codecs/hes.c
index 8c216ed060..c84134c01b 100644
--- a/apps/codecs/hes.c
+++ b/apps/codecs/hes.c
@@ -17,8 +17,8 @@ static struct Hes_Emu hes_emu;
17static void set_codec_track(int t) { 17static void set_codec_track(int t) {
18 Hes_start_track(&hes_emu, t); 18 Hes_start_track(&hes_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(&hes_emu, Track_get_length( &hes_emu, t ), 4000); 22 Track_set_fade(&hes_emu, Track_get_length( &hes_emu, t ), 4000);
23 } 23 }
24 ci->set_elapsed(t*1000); /* t is track no to display */ 24 ci->set_elapsed(t*1000); /* t is track no to display */
diff --git a/apps/codecs/kss.c b/apps/codecs/kss.c
index 62dd05551e..f519b3c706 100644
--- a/apps/codecs/kss.c
+++ b/apps/codecs/kss.c
@@ -18,7 +18,7 @@ static void set_codec_track(int t) {
18 Kss_start_track(&kss_emu, t); 18 Kss_start_track(&kss_emu, t);
19 19
20 /* for REPEAT_ONE we disable track limits */ 20 /* for REPEAT_ONE we disable track limits */
21 if (ci->global_settings->repeat_mode != REPEAT_ONE) { 21 if (!ci->loop_track()) {
22 Track_set_fade(&kss_emu, Track_get_length( &kss_emu, t ), 4000); 22 Track_set_fade(&kss_emu, Track_get_length( &kss_emu, t ), 4000);
23 } 23 }
24 ci->set_elapsed(t*1000); /* t is track no to display */ 24 ci->set_elapsed(t*1000); /* t is track no to display */
diff --git a/apps/codecs/nsf.c b/apps/codecs/nsf.c
index 8899501e05..533972e110 100644
--- a/apps/codecs/nsf.c
+++ b/apps/codecs/nsf.c
@@ -20,7 +20,7 @@ static void set_codec_track(int t, int multitrack) {
20 Nsf_start_track(&nsf_emu, t); 20 Nsf_start_track(&nsf_emu, t);
21 21
22 /* for REPEAT_ONE we disable track limits */ 22 /* for REPEAT_ONE we disable track limits */
23 if (ci->global_settings->repeat_mode != REPEAT_ONE) { 23 if (!ci->loop_track()) {
24 Track_set_fade(&nsf_emu, Track_length( &nsf_emu, t ) - 4000, 4000); 24 Track_set_fade(&nsf_emu, Track_length( &nsf_emu, t ) - 4000, 4000);
25 } 25 }
26 if (multitrack) ci->set_elapsed(t*1000); /* t is track no to display */ 26 if (multitrack) ci->set_elapsed(t*1000); /* t is track no to display */
@@ -109,7 +109,7 @@ next_track:
109 ci->seek_complete(); 109 ci->seek_complete();
110 110
111 /* Set fade again */ 111 /* Set fade again */
112 if (ci->global_settings->repeat_mode != REPEAT_ONE) { 112 if (!ci->loop_track()) {
113 Track_set_fade(&nsf_emu, Track_length( &nsf_emu, track ), 4000); 113 Track_set_fade(&nsf_emu, Track_length( &nsf_emu, track ), 4000);
114 } 114 }
115 } 115 }
diff --git a/apps/codecs/sgc.c b/apps/codecs/sgc.c
index 2f1f3f88bc..993c606c7e 100644
--- a/apps/codecs/sgc.c
+++ b/apps/codecs/sgc.c
@@ -23,7 +23,7 @@ static void set_codec_track(int t) {
23 Sgc_start_track(&sgc_emu, t); 23 Sgc_start_track(&sgc_emu, t);
24 24
25 /* for REPEAT_ONE we disable track limits */ 25 /* for REPEAT_ONE we disable track limits */
26 if (ci->global_settings->repeat_mode != REPEAT_ONE) { 26 if (!ci->loop_track()) {
27 Track_set_fade(&sgc_emu, Track_get_length( &sgc_emu, t ), 4000); 27 Track_set_fade(&sgc_emu, Track_get_length( &sgc_emu, t ), 4000);
28 } 28 }
29 ci->set_elapsed(t*1000); /* t is track no to display */ 29 ci->set_elapsed(t*1000); /* t is track no to display */
diff --git a/apps/codecs/spc.c b/apps/codecs/spc.c
index 3b007471a9..94ac9ffadc 100644
--- a/apps/codecs/spc.c
+++ b/apps/codecs/spc.c
@@ -477,7 +477,7 @@ static int play_track( void )
477 sampleswritten += WAV_CHUNK_SIZE; 477 sampleswritten += WAV_CHUNK_SIZE;
478 478
479 /* is track timed? */ 479 /* is track timed? */
480 if (ci->global_settings->repeat_mode!=REPEAT_ONE && ci->id3->length) { 480 if (!ci->loop_track() && ci->id3->length) {
481 unsigned long curtime = sampleswritten*1000LL/SAMPLE_RATE; 481 unsigned long curtime = sampleswritten*1000LL/SAMPLE_RATE;
482 unsigned long lasttimesample = (sampleswritten-WAV_CHUNK_SIZE); 482 unsigned long lasttimesample = (sampleswritten-WAV_CHUNK_SIZE);
483 483
@@ -513,10 +513,10 @@ static int play_track( void )
513 513
514 spc_play_send_samples(samples); 514 spc_play_send_samples(samples);
515 515
516 if (ci->global_settings->repeat_mode!=REPEAT_ONE) 516 if (ci->loop_track())
517 ci->set_elapsed(sampleswritten*1000LL/SAMPLE_RATE);
518 else
519 ci->set_elapsed(0); 517 ci->set_elapsed(0);
518 else
519 ci->set_elapsed(sampleswritten*1000LL/SAMPLE_RATE);
520 } 520 }
521 521
522 EXIT_TIMER(total); 522 EXIT_TIMER(total);
@@ -571,7 +571,7 @@ enum codec_status codec_run(void)
571 571
572 LoadID666(buffer+0x2e); 572 LoadID666(buffer+0x2e);
573 573
574 if (ci->global_settings->repeat_mode!=REPEAT_ONE && ID666.length==0) { 574 if (!ci->loop_track() && ID666.length==0) {
575 ID666.length=3*60*1000; /* 3 minutes */ 575 ID666.length=3*60*1000; /* 3 minutes */
576 ID666.fade=5*1000; /* 5 seconds */ 576 ID666.fade=5*1000; /* 5 seconds */
577 } 577 }
diff --git a/apps/codecs/vgm.c b/apps/codecs/vgm.c
index 9c8619c7b8..9e4f88779c 100644
--- a/apps/codecs/vgm.c
+++ b/apps/codecs/vgm.c
@@ -105,7 +105,7 @@ enum codec_status codec_run(void)
105 Vgm_start_track(&vgm_emu); 105 Vgm_start_track(&vgm_emu);
106 106
107 /* for REPEAT_ONE we disable track limits */ 107 /* for REPEAT_ONE we disable track limits */
108 if (ci->global_settings->repeat_mode != REPEAT_ONE) { 108 if (!ci->loop_track()) {
109 Track_set_fade(&vgm_emu, ci->id3->length - 4000, 4000); 109 Track_set_fade(&vgm_emu, ci->id3->length - 4000, 4000);
110 } 110 }
111 111