1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Jens Arnold 2006-03-03 02:09:58 +00:00
parent 3187a59f74
commit 8ac3ae73c5
6 changed files with 21 additions and 21 deletions

View file

@ -122,7 +122,7 @@ struct codec_api {
bool reload_codec; bool reload_codec;
/* If seek_time != 0, codec should seek to that song position (in ms) /* If seek_time != 0, codec should seek to that song position (in ms)
if codec supports seeking. */ if codec supports seeking. */
int seek_time; long seek_time;
/* Returns buffer to malloc array. Only codeclib should need this. */ /* Returns buffer to malloc array. Only codeclib should need this. */
void* (*get_codec_memory)(long *size); void* (*get_codec_memory)(long *size);
@ -232,13 +232,13 @@ struct codec_api {
#endif /* !SIMULATOR */ #endif /* !SIMULATOR */
/* playback control */ /* playback control */
void (*PREFIX(audio_play))(int offset); void (*PREFIX(audio_play))(long offset);
void (*audio_stop)(void); void (*audio_stop)(void);
void (*audio_pause)(void); void (*audio_pause)(void);
void (*audio_resume)(void); void (*audio_resume)(void);
void (*audio_next)(void); void (*audio_next)(void);
void (*audio_prev)(void); void (*audio_prev)(void);
void (*audio_ff_rewind)(int newtime); void (*audio_ff_rewind)(long newtime);
struct mp3entry* (*audio_next_track)(void); struct mp3entry* (*audio_next_track)(void);
int (*playlist_amount)(void); int (*playlist_amount)(void);
int (*audio_status)(void); int (*audio_status)(void);

View file

@ -105,7 +105,7 @@ enum codec_status codec_start(struct codec_api* api)
conf->outputFormat = FAAD_FMT_24BIT; /* irrelevant, we don't convert */ conf->outputFormat = FAAD_FMT_24BIT; /* irrelevant, we don't convert */
NeAACDecSetConfiguration(hDecoder, conf); NeAACDecSetConfiguration(hDecoder, conf);
unsigned long s=0; uint32_t s=0;
unsigned char c=0; unsigned char c=0;
err = NeAACDecInit2(hDecoder, demux_res.codecdata,demux_res.codecdata_len, &s, &c); err = NeAACDecInit2(hDecoder, demux_res.codecdata,demux_res.codecdata_len, &s, &c);

View file

@ -668,9 +668,9 @@ void codec_advance_buffer_loc_callback(void *ptr)
long amount; long amount;
if (current_codec == CODEC_IDX_VOICE) if (current_codec == CODEC_IDX_VOICE)
amount = (int)ptr - (int)voicebuf; amount = (long)ptr - (long)voicebuf;
else else
amount = (int)ptr - (int)&filebuf[buf_ridx]; amount = (long)ptr - (long)&filebuf[buf_ridx];
codec_advance_buffer_callback(amount); codec_advance_buffer_callback(amount);
} }
@ -1361,7 +1361,7 @@ static void audio_stop_playback(bool resume)
audio_clear_track_entries(false); audio_clear_track_entries(false);
} }
static void audio_play_start(int offset) static void audio_play_start(long offset)
{ {
if (current_fd >= 0) { if (current_fd >= 0) {
close(current_fd); close(current_fd);
@ -1859,7 +1859,7 @@ void audio_thread(void)
while (audio_codec_loaded) while (audio_codec_loaded)
yield(); yield();
audio_play_start((int)ev.data); audio_play_start((long)ev.data);
playlist_update_resume_info(audio_current_track()); playlist_update_resume_info(audio_current_track());
/* If there are no tracks in the playlist, then the playlist /* If there are no tracks in the playlist, then the playlist
@ -1904,13 +1904,13 @@ void audio_thread(void)
if (!playing) if (!playing)
break ; break ;
pcmbuf_play_stop(); pcmbuf_play_stop();
ci.seek_time = (int)ev.data+1; ci.seek_time = (long)ev.data+1;
break ; break ;
case Q_AUDIO_SEAMLESS_SEEK: case Q_AUDIO_SEAMLESS_SEEK:
if (!playing) if (!playing)
break ; break ;
ci.seek_time = (int)ev.data+1; ci.seek_time = (long)ev.data+1;
break ; break ;
case Q_AUDIO_DIR_NEXT: case Q_AUDIO_DIR_NEXT:
@ -1992,7 +1992,7 @@ void codec_thread(void)
} }
ci.stop_codec = false; ci.stop_codec = false;
wrap = (int)&filebuf[filebuflen] - (int)cur_ti->codecbuf; wrap = (long)&filebuf[filebuflen] - (long)cur_ti->codecbuf;
audio_codec_loaded = true; audio_codec_loaded = true;
mutex_lock(&mutex_codecthread); mutex_lock(&mutex_codecthread);
current_codec = CODEC_IDX_AUDIO; current_codec = CODEC_IDX_AUDIO;
@ -2175,7 +2175,7 @@ bool audio_has_changed_track(void)
return false; return false;
} }
void audio_play(int offset) void audio_play(long offset)
{ {
logf("audio_play"); logf("audio_play");
if (pcmbuf_is_crossfade_enabled()) if (pcmbuf_is_crossfade_enabled())
@ -2262,13 +2262,13 @@ void audio_prev_dir(void)
queue_post(&audio_queue, Q_AUDIO_DIR_PREV, 0); 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); logf("rewind: %d", newpos);
queue_post(&audio_queue, Q_AUDIO_FF_REWIND, (int *)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); logf("seamless_seek: %d", newpos);
queue_post(&audio_queue, Q_AUDIO_SEAMLESS_SEEK, (int *)newpos); queue_post(&audio_queue, Q_AUDIO_SEAMLESS_SEEK, (int *)newpos);

View file

@ -347,13 +347,13 @@ struct plugin_api {
#endif /* !SIMULATOR */ #endif /* !SIMULATOR */
/* playback control */ /* playback control */
void (*PREFIX(audio_play))(int offset); void (*PREFIX(audio_play))(long offset);
void (*audio_stop)(void); void (*audio_stop)(void);
void (*audio_pause)(void); void (*audio_pause)(void);
void (*audio_resume)(void); void (*audio_resume)(void);
void (*audio_next)(void); void (*audio_next)(void);
void (*audio_prev)(void); void (*audio_prev)(void);
void (*audio_ff_rewind)(int newtime); void (*audio_ff_rewind)(long newtime);
struct mp3entry* (*audio_next_track)(void); struct mp3entry* (*audio_next_track)(void);
int (*playlist_amount)(void); int (*playlist_amount)(void);
int (*audio_status)(void); int (*audio_status)(void);

View file

@ -63,15 +63,15 @@ struct audio_debug
}; };
void audio_init(void); void audio_init(void);
void audio_play(int offset); void audio_play(long offset);
void audio_stop(void); void audio_stop(void);
void audio_pause(void); void audio_pause(void);
void audio_resume(void); void audio_resume(void);
void audio_next(void); void audio_next(void);
void audio_prev(void); void audio_prev(void);
int audio_status(void); int audio_status(void);
void audio_ff_rewind(int newtime); void audio_ff_rewind(long newtime);
void audio_seamless_seek(int newtime); void audio_seamless_seek(long newtime);
void audio_flush_and_reload_tracks(void); void audio_flush_and_reload_tracks(void);
struct mp3entry* audio_current_track(void); struct mp3entry* audio_current_track(void);
struct mp3entry* audio_next_track(void); struct mp3entry* audio_next_track(void);

View file

@ -2671,7 +2671,7 @@ void audio_set_recording_options(int frequency, int quality,
#endif /* SIMULATOR */ #endif /* SIMULATOR */
#endif /* CONFIG_CODEC == MAS3587F */ #endif /* CONFIG_CODEC == MAS3587F */
void audio_play(int offset) void audio_play(long offset)
{ {
#ifdef SIMULATOR #ifdef SIMULATOR
char* trackname; char* trackname;
@ -2805,7 +2805,7 @@ void audio_prev(void)
#endif /* SIMULATOR */ #endif /* SIMULATOR */
} }
void audio_ff_rewind(int newtime) void audio_ff_rewind(long newtime)
{ {
#ifndef SIMULATOR #ifndef SIMULATOR
queue_post(&mpeg_queue, MPEG_FF_REWIND, (void *)newtime); queue_post(&mpeg_queue, MPEG_FF_REWIND, (void *)newtime);