From 8ac3ae73c5f5a87dc4cddafe2b0d1a0f41e41bdd Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Fri, 3 Mar 2006 02:09:58 +0000 Subject: More 64bit simulator fixes, coinciding with the long policy this time. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8890 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs.h | 6 +++--- apps/codecs/aac.c | 2 +- apps/playback.c | 20 ++++++++++---------- apps/plugin.h | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'apps') diff --git a/apps/codecs.h b/apps/codecs.h index cf0324b496..7a0fab297f 100644 --- a/apps/codecs.h +++ b/apps/codecs.h @@ -122,7 +122,7 @@ struct codec_api { bool reload_codec; /* If seek_time != 0, codec should seek to that song position (in ms) if codec supports seeking. */ - int seek_time; + long seek_time; /* Returns buffer to malloc array. Only codeclib should need this. */ void* (*get_codec_memory)(long *size); @@ -232,13 +232,13 @@ struct codec_api { #endif /* !SIMULATOR */ /* playback control */ - void (*PREFIX(audio_play))(int offset); + void (*PREFIX(audio_play))(long offset); void (*audio_stop)(void); void (*audio_pause)(void); void (*audio_resume)(void); void (*audio_next)(void); void (*audio_prev)(void); - void (*audio_ff_rewind)(int newtime); + void (*audio_ff_rewind)(long newtime); struct mp3entry* (*audio_next_track)(void); int (*playlist_amount)(void); int (*audio_status)(void); diff --git a/apps/codecs/aac.c b/apps/codecs/aac.c index 06a0e16527..84f2a90625 100644 --- a/apps/codecs/aac.c +++ b/apps/codecs/aac.c @@ -105,7 +105,7 @@ enum codec_status codec_start(struct codec_api* api) conf->outputFormat = FAAD_FMT_24BIT; /* irrelevant, we don't convert */ NeAACDecSetConfiguration(hDecoder, conf); - unsigned long s=0; + uint32_t s=0; unsigned char c=0; err = NeAACDecInit2(hDecoder, demux_res.codecdata,demux_res.codecdata_len, &s, &c); diff --git a/apps/playback.c b/apps/playback.c index 921121163f..ce0e326a4c 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -668,9 +668,9 @@ void codec_advance_buffer_loc_callback(void *ptr) long amount; if (current_codec == CODEC_IDX_VOICE) - amount = (int)ptr - (int)voicebuf; + amount = (long)ptr - (long)voicebuf; else - amount = (int)ptr - (int)&filebuf[buf_ridx]; + amount = (long)ptr - (long)&filebuf[buf_ridx]; codec_advance_buffer_callback(amount); } @@ -1361,7 +1361,7 @@ static void audio_stop_playback(bool resume) audio_clear_track_entries(false); } -static void audio_play_start(int offset) +static void audio_play_start(long offset) { if (current_fd >= 0) { close(current_fd); @@ -1859,7 +1859,7 @@ void audio_thread(void) while (audio_codec_loaded) yield(); - audio_play_start((int)ev.data); + audio_play_start((long)ev.data); playlist_update_resume_info(audio_current_track()); /* If there are no tracks in the playlist, then the playlist @@ -1904,13 +1904,13 @@ void audio_thread(void) if (!playing) break ; pcmbuf_play_stop(); - ci.seek_time = (int)ev.data+1; + ci.seek_time = (long)ev.data+1; break ; case Q_AUDIO_SEAMLESS_SEEK: if (!playing) break ; - ci.seek_time = (int)ev.data+1; + ci.seek_time = (long)ev.data+1; break ; case Q_AUDIO_DIR_NEXT: @@ -1992,7 +1992,7 @@ void codec_thread(void) } ci.stop_codec = false; - wrap = (int)&filebuf[filebuflen] - (int)cur_ti->codecbuf; + wrap = (long)&filebuf[filebuflen] - (long)cur_ti->codecbuf; audio_codec_loaded = true; mutex_lock(&mutex_codecthread); current_codec = CODEC_IDX_AUDIO; @@ -2175,7 +2175,7 @@ bool audio_has_changed_track(void) return false; } -void audio_play(int offset) +void audio_play(long offset) { logf("audio_play"); if (pcmbuf_is_crossfade_enabled()) @@ -2262,13 +2262,13 @@ void audio_prev_dir(void) queue_post(&audio_queue, Q_AUDIO_DIR_PREV, 0); } -void audio_ff_rewind(int newpos) +void audio_ff_rewind(long newpos) { logf("rewind: %d", newpos); queue_post(&audio_queue, Q_AUDIO_FF_REWIND, (int *)newpos); } -void audio_seamless_seek(int newpos) +void audio_seamless_seek(long newpos) { logf("seamless_seek: %d", newpos); queue_post(&audio_queue, Q_AUDIO_SEAMLESS_SEEK, (int *)newpos); diff --git a/apps/plugin.h b/apps/plugin.h index 6d96d36dc1..aa4db39d0b 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -347,13 +347,13 @@ struct plugin_api { #endif /* !SIMULATOR */ /* playback control */ - void (*PREFIX(audio_play))(int offset); + void (*PREFIX(audio_play))(long offset); void (*audio_stop)(void); void (*audio_pause)(void); void (*audio_resume)(void); void (*audio_next)(void); void (*audio_prev)(void); - void (*audio_ff_rewind)(int newtime); + void (*audio_ff_rewind)(long newtime); struct mp3entry* (*audio_next_track)(void); int (*playlist_amount)(void); int (*audio_status)(void); -- cgit v1.2.3