diff options
-rw-r--r-- | apps/codecs.h | 6 | ||||
-rw-r--r-- | apps/codecs/aac.c | 2 | ||||
-rw-r--r-- | apps/playback.c | 20 | ||||
-rw-r--r-- | apps/plugin.h | 4 | ||||
-rw-r--r-- | firmware/export/audio.h | 6 | ||||
-rw-r--r-- | firmware/mpeg.c | 4 |
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 { | |||
122 | bool reload_codec; | 122 | bool reload_codec; |
123 | /* If seek_time != 0, codec should seek to that song position (in ms) | 123 | /* If seek_time != 0, codec should seek to that song position (in ms) |
124 | if codec supports seeking. */ | 124 | if codec supports seeking. */ |
125 | int seek_time; | 125 | long seek_time; |
126 | 126 | ||
127 | /* Returns buffer to malloc array. Only codeclib should need this. */ | 127 | /* Returns buffer to malloc array. Only codeclib should need this. */ |
128 | void* (*get_codec_memory)(long *size); | 128 | void* (*get_codec_memory)(long *size); |
@@ -232,13 +232,13 @@ struct codec_api { | |||
232 | #endif /* !SIMULATOR */ | 232 | #endif /* !SIMULATOR */ |
233 | 233 | ||
234 | /* playback control */ | 234 | /* playback control */ |
235 | void (*PREFIX(audio_play))(int offset); | 235 | void (*PREFIX(audio_play))(long offset); |
236 | void (*audio_stop)(void); | 236 | void (*audio_stop)(void); |
237 | void (*audio_pause)(void); | 237 | void (*audio_pause)(void); |
238 | void (*audio_resume)(void); | 238 | void (*audio_resume)(void); |
239 | void (*audio_next)(void); | 239 | void (*audio_next)(void); |
240 | void (*audio_prev)(void); | 240 | void (*audio_prev)(void); |
241 | void (*audio_ff_rewind)(int newtime); | 241 | void (*audio_ff_rewind)(long newtime); |
242 | struct mp3entry* (*audio_next_track)(void); | 242 | struct mp3entry* (*audio_next_track)(void); |
243 | int (*playlist_amount)(void); | 243 | int (*playlist_amount)(void); |
244 | int (*audio_status)(void); | 244 | 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) | |||
105 | conf->outputFormat = FAAD_FMT_24BIT; /* irrelevant, we don't convert */ | 105 | conf->outputFormat = FAAD_FMT_24BIT; /* irrelevant, we don't convert */ |
106 | NeAACDecSetConfiguration(hDecoder, conf); | 106 | NeAACDecSetConfiguration(hDecoder, conf); |
107 | 107 | ||
108 | unsigned long s=0; | 108 | uint32_t s=0; |
109 | unsigned char c=0; | 109 | unsigned char c=0; |
110 | 110 | ||
111 | err = NeAACDecInit2(hDecoder, demux_res.codecdata,demux_res.codecdata_len, &s, &c); | 111 | 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) | |||
668 | long amount; | 668 | long amount; |
669 | 669 | ||
670 | if (current_codec == CODEC_IDX_VOICE) | 670 | if (current_codec == CODEC_IDX_VOICE) |
671 | amount = (int)ptr - (int)voicebuf; | 671 | amount = (long)ptr - (long)voicebuf; |
672 | else | 672 | else |
673 | amount = (int)ptr - (int)&filebuf[buf_ridx]; | 673 | amount = (long)ptr - (long)&filebuf[buf_ridx]; |
674 | codec_advance_buffer_callback(amount); | 674 | codec_advance_buffer_callback(amount); |
675 | } | 675 | } |
676 | 676 | ||
@@ -1361,7 +1361,7 @@ static void audio_stop_playback(bool resume) | |||
1361 | audio_clear_track_entries(false); | 1361 | audio_clear_track_entries(false); |
1362 | } | 1362 | } |
1363 | 1363 | ||
1364 | static void audio_play_start(int offset) | 1364 | static void audio_play_start(long offset) |
1365 | { | 1365 | { |
1366 | if (current_fd >= 0) { | 1366 | if (current_fd >= 0) { |
1367 | close(current_fd); | 1367 | close(current_fd); |
@@ -1859,7 +1859,7 @@ void audio_thread(void) | |||
1859 | while (audio_codec_loaded) | 1859 | while (audio_codec_loaded) |
1860 | yield(); | 1860 | yield(); |
1861 | 1861 | ||
1862 | audio_play_start((int)ev.data); | 1862 | audio_play_start((long)ev.data); |
1863 | playlist_update_resume_info(audio_current_track()); | 1863 | playlist_update_resume_info(audio_current_track()); |
1864 | 1864 | ||
1865 | /* If there are no tracks in the playlist, then the playlist | 1865 | /* If there are no tracks in the playlist, then the playlist |
@@ -1904,13 +1904,13 @@ void audio_thread(void) | |||
1904 | if (!playing) | 1904 | if (!playing) |
1905 | break ; | 1905 | break ; |
1906 | pcmbuf_play_stop(); | 1906 | pcmbuf_play_stop(); |
1907 | ci.seek_time = (int)ev.data+1; | 1907 | ci.seek_time = (long)ev.data+1; |
1908 | break ; | 1908 | break ; |
1909 | 1909 | ||
1910 | case Q_AUDIO_SEAMLESS_SEEK: | 1910 | case Q_AUDIO_SEAMLESS_SEEK: |
1911 | if (!playing) | 1911 | if (!playing) |
1912 | break ; | 1912 | break ; |
1913 | ci.seek_time = (int)ev.data+1; | 1913 | ci.seek_time = (long)ev.data+1; |
1914 | break ; | 1914 | break ; |
1915 | 1915 | ||
1916 | case Q_AUDIO_DIR_NEXT: | 1916 | case Q_AUDIO_DIR_NEXT: |
@@ -1992,7 +1992,7 @@ void codec_thread(void) | |||
1992 | } | 1992 | } |
1993 | 1993 | ||
1994 | ci.stop_codec = false; | 1994 | ci.stop_codec = false; |
1995 | wrap = (int)&filebuf[filebuflen] - (int)cur_ti->codecbuf; | 1995 | wrap = (long)&filebuf[filebuflen] - (long)cur_ti->codecbuf; |
1996 | audio_codec_loaded = true; | 1996 | audio_codec_loaded = true; |
1997 | mutex_lock(&mutex_codecthread); | 1997 | mutex_lock(&mutex_codecthread); |
1998 | current_codec = CODEC_IDX_AUDIO; | 1998 | current_codec = CODEC_IDX_AUDIO; |
@@ -2175,7 +2175,7 @@ bool audio_has_changed_track(void) | |||
2175 | return false; | 2175 | return false; |
2176 | } | 2176 | } |
2177 | 2177 | ||
2178 | void audio_play(int offset) | 2178 | void audio_play(long offset) |
2179 | { | 2179 | { |
2180 | logf("audio_play"); | 2180 | logf("audio_play"); |
2181 | if (pcmbuf_is_crossfade_enabled()) | 2181 | if (pcmbuf_is_crossfade_enabled()) |
@@ -2262,13 +2262,13 @@ void audio_prev_dir(void) | |||
2262 | queue_post(&audio_queue, Q_AUDIO_DIR_PREV, 0); | 2262 | queue_post(&audio_queue, Q_AUDIO_DIR_PREV, 0); |
2263 | } | 2263 | } |
2264 | 2264 | ||
2265 | void audio_ff_rewind(int newpos) | 2265 | void audio_ff_rewind(long newpos) |
2266 | { | 2266 | { |
2267 | logf("rewind: %d", newpos); | 2267 | logf("rewind: %d", newpos); |
2268 | queue_post(&audio_queue, Q_AUDIO_FF_REWIND, (int *)newpos); | 2268 | queue_post(&audio_queue, Q_AUDIO_FF_REWIND, (int *)newpos); |
2269 | } | 2269 | } |
2270 | 2270 | ||
2271 | void audio_seamless_seek(int newpos) | 2271 | void audio_seamless_seek(long newpos) |
2272 | { | 2272 | { |
2273 | logf("seamless_seek: %d", newpos); | 2273 | logf("seamless_seek: %d", newpos); |
2274 | queue_post(&audio_queue, Q_AUDIO_SEAMLESS_SEEK, (int *)newpos); | 2274 | 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 { | |||
347 | #endif /* !SIMULATOR */ | 347 | #endif /* !SIMULATOR */ |
348 | 348 | ||
349 | /* playback control */ | 349 | /* playback control */ |
350 | void (*PREFIX(audio_play))(int offset); | 350 | void (*PREFIX(audio_play))(long offset); |
351 | void (*audio_stop)(void); | 351 | void (*audio_stop)(void); |
352 | void (*audio_pause)(void); | 352 | void (*audio_pause)(void); |
353 | void (*audio_resume)(void); | 353 | void (*audio_resume)(void); |
354 | void (*audio_next)(void); | 354 | void (*audio_next)(void); |
355 | void (*audio_prev)(void); | 355 | void (*audio_prev)(void); |
356 | void (*audio_ff_rewind)(int newtime); | 356 | void (*audio_ff_rewind)(long newtime); |
357 | struct mp3entry* (*audio_next_track)(void); | 357 | struct mp3entry* (*audio_next_track)(void); |
358 | int (*playlist_amount)(void); | 358 | int (*playlist_amount)(void); |
359 | int (*audio_status)(void); | 359 | 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 | |||
63 | }; | 63 | }; |
64 | 64 | ||
65 | void audio_init(void); | 65 | void audio_init(void); |
66 | void audio_play(int offset); | 66 | void audio_play(long offset); |
67 | void audio_stop(void); | 67 | void audio_stop(void); |
68 | void audio_pause(void); | 68 | void audio_pause(void); |
69 | void audio_resume(void); | 69 | void audio_resume(void); |
70 | void audio_next(void); | 70 | void audio_next(void); |
71 | void audio_prev(void); | 71 | void audio_prev(void); |
72 | int audio_status(void); | 72 | int audio_status(void); |
73 | void audio_ff_rewind(int newtime); | 73 | void audio_ff_rewind(long newtime); |
74 | void audio_seamless_seek(int newtime); | 74 | void audio_seamless_seek(long newtime); |
75 | void audio_flush_and_reload_tracks(void); | 75 | void audio_flush_and_reload_tracks(void); |
76 | struct mp3entry* audio_current_track(void); | 76 | struct mp3entry* audio_current_track(void); |
77 | struct mp3entry* audio_next_track(void); | 77 | 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, | |||
2671 | #endif /* SIMULATOR */ | 2671 | #endif /* SIMULATOR */ |
2672 | #endif /* CONFIG_CODEC == MAS3587F */ | 2672 | #endif /* CONFIG_CODEC == MAS3587F */ |
2673 | 2673 | ||
2674 | void audio_play(int offset) | 2674 | void audio_play(long offset) |
2675 | { | 2675 | { |
2676 | #ifdef SIMULATOR | 2676 | #ifdef SIMULATOR |
2677 | char* trackname; | 2677 | char* trackname; |
@@ -2805,7 +2805,7 @@ void audio_prev(void) | |||
2805 | #endif /* SIMULATOR */ | 2805 | #endif /* SIMULATOR */ |
2806 | } | 2806 | } |
2807 | 2807 | ||
2808 | void audio_ff_rewind(int newtime) | 2808 | void audio_ff_rewind(long newtime) |
2809 | { | 2809 | { |
2810 | #ifndef SIMULATOR | 2810 | #ifndef SIMULATOR |
2811 | queue_post(&mpeg_queue, MPEG_FF_REWIND, (void *)newtime); | 2811 | queue_post(&mpeg_queue, MPEG_FF_REWIND, (void *)newtime); |