diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2011-04-27 16:46:27 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2011-04-27 16:46:27 +0000 |
commit | 3d9c0628220175603757ea1fabce7a9d34a75739 (patch) | |
tree | a5c5af11c6856f0f084241212e45763af412f946 /apps/codecs | |
parent | 08bedf83051064c7dc9a7bb903ab9a34afe8d725 (diff) | |
download | rockbox-3d9c0628220175603757ea1fabce7a9d34a75739.tar.gz rockbox-3d9c0628220175603757ea1fabce7a9d34a75739.zip |
Get NSF fixed up a bit and parse metadata in the core.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29790 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r-- | apps/codecs/nsf.c | 25 |
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; | |||
4319 | enum codec_status codec_main(enum codec_entry_call_reason reason) | 4319 | enum 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(¶m); | 4410 | enum codec_command_action action = ci->get_command(¶m); |
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); |