summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-03-03 02:09:58 +0000
committerJens Arnold <amiconn@rockbox.org>2006-03-03 02:09:58 +0000
commit8ac3ae73c5f5a87dc4cddafe2b0d1a0f41e41bdd (patch)
treebf6477ab6f715af85901f0c81ef0d12d01402ace
parent3187a59f7467cc10371748f0cc17846dddc3c22a (diff)
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
-rw-r--r--apps/codecs.h6
-rw-r--r--apps/codecs/aac.c2
-rw-r--r--apps/playback.c20
-rw-r--r--apps/plugin.h4
-rw-r--r--firmware/export/audio.h6
-rw-r--r--firmware/mpeg.c4
6 files changed, 21 insertions, 21 deletions
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);
diff --git a/firmware/export/audio.h b/firmware/export/audio.h
index 6867f3a268..62dec73078 100644
--- a/firmware/export/audio.h
+++ b/firmware/export/audio.h
@@ -63,15 +63,15 @@ struct audio_debug
};
void audio_init(void);
-void audio_play(int offset);
+void audio_play(long offset);
void audio_stop(void);
void audio_pause(void);
void audio_resume(void);
void audio_next(void);
void audio_prev(void);
int audio_status(void);
-void audio_ff_rewind(int newtime);
-void audio_seamless_seek(int newtime);
+void audio_ff_rewind(long newtime);
+void audio_seamless_seek(long newtime);
void audio_flush_and_reload_tracks(void);
struct mp3entry* audio_current_track(void);
struct mp3entry* audio_next_track(void);
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index f1bb97291a..c47c279d24 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -2671,7 +2671,7 @@ void audio_set_recording_options(int frequency, int quality,
#endif /* SIMULATOR */
#endif /* CONFIG_CODEC == MAS3587F */
-void audio_play(int offset)
+void audio_play(long offset)
{
#ifdef SIMULATOR
char* trackname;
@@ -2805,7 +2805,7 @@ void audio_prev(void)
#endif /* SIMULATOR */
}
-void audio_ff_rewind(int newtime)
+void audio_ff_rewind(long newtime)
{
#ifndef SIMULATOR
queue_post(&mpeg_queue, MPEG_FF_REWIND, (void *)newtime);