summaryrefslogtreecommitdiff
path: root/apps/codecs/spc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/spc.c')
-rw-r--r--apps/codecs/spc.c10
1 files changed, 5 insertions, 5 deletions
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 }