summaryrefslogtreecommitdiff
path: root/apps/codecs/nsf.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/nsf.c')
-rw-r--r--apps/codecs/nsf.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/apps/codecs/nsf.c b/apps/codecs/nsf.c
index 72f6974214..b1bfb82dcd 100644
--- a/apps/codecs/nsf.c
+++ b/apps/codecs/nsf.c
@@ -4319,7 +4319,7 @@ static int dontresettrack = 0;
4319enum codec_status codec_main(enum codec_entry_call_reason reason) 4319enum codec_status codec_main(enum codec_entry_call_reason reason)
4320{ 4320{
4321 if (reason == CODEC_LOAD) { 4321 if (reason == CODEC_LOAD) {
4322 /* we only render 16 bits, 44.1KHz, Stereo */ 4322 /* we only render 16 bits, 44.1KHz, Mono */
4323 ci->configure(DSP_SET_SAMPLE_DEPTH, 16); 4323 ci->configure(DSP_SET_SAMPLE_DEPTH, 16);
4324 ci->configure(DSP_SET_FREQUENCY, 44100); 4324 ci->configure(DSP_SET_FREQUENCY, 44100);
4325 ci->configure(DSP_SET_STEREO_MODE, STEREO_MONO); 4325 ci->configure(DSP_SET_STEREO_MODE, STEREO_MONO);
@@ -4338,6 +4338,7 @@ enum codec_status codec_run(void)
4338 size_t n; 4338 size_t n;
4339 int endofstream; /* end of stream flag */ 4339 int endofstream; /* end of stream flag */
4340 int usingplaylist = 0; 4340 int usingplaylist = 0;
4341 intptr_t param;
4341 4342
4342 DEBUGF("NSF: next_track\n"); 4343 DEBUGF("NSF: next_track\n");
4343 if (codec_init()) { 4344 if (codec_init()) {
@@ -4406,27 +4407,21 @@ init_nsf:
4406 reset_profile_timers(); 4407 reset_profile_timers();
4407 4408
4408 while (!endofstream) { 4409 while (!endofstream) {
4409 intptr_t param;
4410 enum codec_command_action action = ci->get_command(&param); 4410 enum codec_command_action action = ci->get_command(&param);
4411 4411
4412 if (action == CODEC_ACTION_HALT) 4412 if (action == CODEC_ACTION_HALT)
4413 break; 4413 break;
4414 4414
4415 if (action == CODEC_ACTION_SEEK_TIME) { 4415 if (action == CODEC_ACTION_SEEK_TIME) {
4416 if (param > 0) { 4416 track=param/1000;
4417 track=param/1000; 4417 if (usingplaylist) {
4418 if (usingplaylist) { 4418 if (track>=nPlaylistSize) break;
4419 if (track>=nPlaylistSize) break; 4419 } else {
4420 } else { 4420 if (track>=nTrackCount) break;
4421 if (track>=nTrackCount) break;
4422 }
4423 dontresettrack=1;
4424 ci->seek_complete();
4425 goto init_nsf;
4426 }
4427 else {
4428 ci->seek_complete();
4429 } 4421 }
4422 dontresettrack=1;
4423 ci->seek_complete();
4424 goto init_nsf;
4430 } 4425 }
4431 4426
4432 ENTER_TIMER(total); 4427 ENTER_TIMER(total);