summaryrefslogtreecommitdiffstats
path: root/apps/codecs/nsf.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-04-27 16:46:27 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-04-27 16:46:27 +0000
commit3d9c0628220175603757ea1fabce7a9d34a75739 (patch)
treea5c5af11c6856f0f084241212e45763af412f946 /apps/codecs/nsf.c
parent08bedf83051064c7dc9a7bb903ab9a34afe8d725 (diff)
downloadrockbox-3d9c0628220175603757ea1fabce7a9d34a75739.tar.gz
rockbox-3d9c0628220175603757ea1fabce7a9d34a75739.tar.bz2
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/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;
enum codec_status codec_main(enum codec_entry_call_reason reason)
{
if (reason == CODEC_LOAD) {
- /* we only render 16 bits, 44.1KHz, Stereo */
+ /* we only render 16 bits, 44.1KHz, Mono */
ci->configure(DSP_SET_SAMPLE_DEPTH, 16);
ci->configure(DSP_SET_FREQUENCY, 44100);
ci->configure(DSP_SET_STEREO_MODE, STEREO_MONO);
@@ -4338,6 +4338,7 @@ enum codec_status codec_run(void)
size_t n;
int endofstream; /* end of stream flag */
int usingplaylist = 0;
+ intptr_t param;
DEBUGF("NSF: next_track\n");
if (codec_init()) {
@@ -4406,27 +4407,21 @@ init_nsf:
reset_profile_timers();
while (!endofstream) {
- intptr_t param;
enum codec_command_action action = ci->get_command(&param);
if (action == CODEC_ACTION_HALT)
break;
if (action == CODEC_ACTION_SEEK_TIME) {
- if (param > 0) {
- track=param/1000;
- if (usingplaylist) {
- if (track>=nPlaylistSize) break;
- } else {
- if (track>=nTrackCount) break;
- }
- dontresettrack=1;
- ci->seek_complete();
- goto init_nsf;
- }
- else {
- ci->seek_complete();
+ track=param/1000;
+ if (usingplaylist) {
+ if (track>=nPlaylistSize) break;
+ } else {
+ if (track>=nTrackCount) break;
}
+ dontresettrack=1;
+ ci->seek_complete();
+ goto init_nsf;
}
ENTER_TIMER(total);